"But like all the best teachers, she knows that her students have just as much to teach her as she has to teach them. And teaching Bart is a job filled with growth opportunities."
The show's Emmy-winning co-executive producer Carolyn Omine created the part.
She said: "She's really good at figuring out what the kids need, but she can't really figure out what his problem is until he finally comes clean."
Omine had been keen to get Kerry on the show after being impressed by her comedic genius when she hosted Saturday Night Live in 2013.
She said: "I had always known she was a super-talented actress who had great range, but just never knew she was funny.
"She had a lot of characters and just really great comic timing, and I was like, 'We should really think of using her.'"
Fast-forward to 2020, Kerry made it known that she would like to voice black characters, following a backlash that saw white voice actor Hank Azaria quit portraying the parts of people of colour, including Apu Nahasapeemapetilon.
She tweeted: "Dear animators looking for black voices… I'm avail."
Omine added: "That just got it into my head.
"I began thinking, 'Maybe she could be the new teacher. We've had this spot.' I talked with [executive producer] Matt Selman, and we decided to write it with her in mind."
It's a somewhat full-circle moment for Kerry, as she used to be a teacher in real-life and the profession is in her blood.
And as a Simpsons buff, it was an offer she couldn't refuse.
She added: "I'm just a huge Simpsons fan!
"What an extraordinary legacy to be a part of! And I thought the idea of playing Bart's teacher was so funny. I used to be a teacher in NYC public schools. And my mother is a retired teacher. Teaching is, to me, a sacred profession. I could only imagine the laughs involved in teaching Bart."