Andrew Hamilton students in 2019, working on the Shira Walinsky mural to brighten their gym. (Courtesy Shira Walinsky)

The latest episode of “Abbott Elementary” features Mural Arts Philadelphia, and the storyline mirrors a recent arts project that really happened at show creator Quinta Brunson’s former school, according to a former principal.

In 2018, Fatima Smith applied to redo the exterior of West Philly’s Andrew Hamilton Elementary through Mural Arts. She was told a mural of that scale wouldn’t be feasible.

“You have to be really creative if you have a need for your school facility,” said Smith, who is now principal at a public school in Richmond, Virginia. “How can you utilize your community partners? How can you utilize charitable donations to revamp those spaces?”

She decided to look elsewhere for a way to get what she described as the school district’s ever-present funding struggles — a theme “Abbott Elementary” brings to the forefront. She was connected with the University of Pennsylvania’s Netter Center for Community Partnerships, Smith said, which now maintains an extensive relationship with the K-8 school.

Through the Netter Center, Smith was connected with Penn educator Shira Walinsky, an artist who’s done dozens of Mural Arts projects around the city.

Walinsky agreed to do a piece for the school — and figure out how to make it happen at no cost.

“All kids deserve beautiful schools. Neighborhoods deserve beautiful and inspiring schools,” said Walinsky. “That's just a fact — and this principal was a fighter for that.”

At the time, Philadelphia schools were just beginning to recover from the early decade “doomsday budget,” Walinsky said, and some of her previous attempts to do big, disruptive group arts projects had been met with reluctance as principals struggled to maintain general education requirements

But for Smith, a mural was “the first thing on her list,” Walinsky recalled. “She said that the gym class had to leave so we could come paint,” the artist said. “And that just never happens.”

The Mural Arts storyline of “Abbott Elementary” was based on Brunson’s own experience with a painting happening at the school, the comedian posted on Twitter.

Alexander Hamilton has a student body that’s entirely identified as economically disadvantaged, and more than 90% of its students are Black, according to district data. Enrollment has steadily decreased over the past decade, from 555 in 2014 to 322 this year. The gym used to be “dark, heavy, and gloomy,” according to the former principal, with dark wall paint and dim lighting.

“I wanted to create a sacred space,” Smith said, “and figure out what I can do to improve the aesthetic so that our kids have a better time interacting with the space.”

Walinsky designed a mural filled with moving bodies and bright colors, requisitioned some leftover paint from a prior mural, and enlisted a group of helpers: Penn students enrolled in her public art class, volunteers from the community, and Andrew Hamilton middle schoolers themselves.

Andrew Hamilton students and artist Shira Walinsky in 2019, working on the mural to brighten the West Philadelphia school's gym. (Courtesy Shira Walinsky)

The mural was created over the course of a couple months, with a majority of the work being completed on Martin Luther King Day of Service in 2019. On a cold January day, over 50 students, staff, and volunteers worked together to paint the gym.

As the painting began to take shape, Walinsky said, the excitement was palpable. The gym got so loud that Walinsky “just had to record it” to capture the buzz.

After the artwork was complete, the space was filled with bright pastels and primary colors that lifted the room’s atmosphere. It’s made a big difference, per Smith.

“Students are always excited to delve into something they haven’t been exposed to before,” Smith said. “Just to be able to learn from people who’ve mastered painting and visual arts, I think our students responded pretty well to that.”

Season 2, Episode 17 of “Abbott Elementary” aired March 1 on ABC and is available to stream on Hulu.