Another fantasy episode! We did the Groundhog Day thing not that long ago, but I’ll accept because this one is definitely worth it.

Let me back up. We begin with Morgan prepping Mindy for her interview to be the head of the obstetrics department at the hospital. Jody is also interviewing for the job. Once Mindy is in the interview, we see that he has a clear advantage: The entire team conducting the interviews is comprised of white men. One of them can’t even bring himself to say “single mother” in Mindy’s interview. Another of them asks if she’ll be able to keep her emotions in check and think logically.

Despite a solid speech about her passion for the hospital — with what’s actually a perfectly placed, cute joke about its great chicken fingers — Mindy doesn’t get a second-round interview. Jody does.

With that, Mindy goes to sleep wishing she were a white man. This scares me, because I get where we’re going with this and I really do not want to see Mindy spend an episode dressed and made up to look like a white man. However, The Mindy Project is smarter than that: As white-man Mindy, it cast Ryan Hansen, who you might recognize from Veronica Mars and Party Down. He’s tall, in great shape, and blond; of course, Mindy loves herself when she looks in the mirror. He also happens to give a perfectly pitched performance throughout the episode — mimicking Mindy when it counts, but without going overboard.

Mindy even gives white-male Mindy a real, logical alternative life. His name is Michael Lancaster, and he has a bachelor pad full of leather furniture. She’s — sorry, he’s — a “divorced baby daddy.” “I’m basically a Whit Stillman character,” Mindy says to herself in voice-over. “Whoa, I’m so white I know who Whit Stillman is.”

Excited by all of this new bodily equipment, Michael spends two hours masturbating in the morning. This would make him massively late for work, except, of course, it takes him only three minutes to get dressed and groomed. When he gets to work, things are even more baffling: Everyone at the office thinks his jokes are funny and takes his “announcement” dead seriously. Later, he spends several minutes hailing cabs and getting them every time, just for fun. Also, manspreading on the subway? Good time.

Most significantly, Michael discovers that unlike Mindy, he has been granted a second-round interview at the hospital. The questions are barely even questions; no one there is worried about how he’ll balance his children and work. After all, won’t his ex-wife take care of them? Or wait: “Did Nicole have to go back to Tranquil Palms? I thought the shocks were working.” Michael wonders aloud why the committee doesn’t ask about his leadership skills. “I can tell you’re a good leader just by looking at you,” one of the white men says.

Back at the office, Jody and Jeremy invite Michael out for a “lads’ night” to blow off some steam. At the bar, a group of beautiful women send the guys drinks. Mindy’s voice over is impressed: “The only person I’ve ever sent a drink to was Wolf Blitzer, and he threw it in my face.” Michael gets so drunk that he can’t even remember the one-night stand that follows, and he misses his C-section the next morning.

When he rushes to the hospital, he discovers Dr. Lee — the only other Asian woman who was in the running for the top job, who’s so dorky that Mindy shunned her — did his procedure for him. And it turns out she’s really good at her job. It helps, of course, that she can’t drink because of her irritable bowel syndrome. But Michael/Mindy is incensed to learn that Dr. Lee didn’t get a second interview for the top job, even though old, crazy Dr. Ledreau did.

Michael complains to Tamra about this, but Tamra is unsurprised: “It’s just one of those annoying racist things white people do.” At this, Michael decides to tell Tamra his secret: He is a brown woman trapped in a white man’s body. She’s so excited to be on the receiving end of a fantasy-sequence confession that she puts aside her qualms: “The gender part, the racial part is offensive and I cannot. But I’m onboard.” Besides, she adds, “I don’t even care as long as I’m not the one who has to learn the lesson.” I love the way Mindy has routinely dispensed with the natural objections sane people would have in these circumstances, just for the sake of sitcom expediency.

That means it’s time for a makeover — a business makeover! Michael and Tamra get Dr. Lee some more professional clothes and advise her to use a hint of sex appeal, since that’s one advantage women have over men. “My doctor told me I don’t have that,” Dr. Lee says. Then they coach her to demand an interview by pointing out that all of the finalists are white. Tamra explains, “Every white person’s greatest fear is being called racist. It’s their equivalent of actual racism.”

Dr. Lee gets the interview, but she doesn’t get the job.

Michael is devastated to learn that racism and sexism are even more intractable than he thought. He storms into the boardroom to point out that many of the hospital’s ob-gyn patients are nonwhite, and all of them are obviously women — so it would make sense to have a nonwhite woman leading the department. The men are unmoved. “Honestly, our last department head was a black woman,” one explains. “And a lesbian, which I don’t think we get enough credit for. And she was great. She was fine. But we thought we’d go in a different direction.” In other words, two nonwhite women in a row was too much for them to bear.

So they decide to give the job to crazy coot Dr. Ledreau, even though everyone knows he pushed Barbara off that boat. (I mean, he was never convicted.)

Mindy-as-Michael realizes now how racism and sexism really work. When you’re privileged, “Your life is so carefree, you start wondering why other people don’t just help themselves. Because you think life is just as easy for everyone else.” But Mindy misses being interesting and different, so she wishes to go back to being an Indian woman. Plus, she gets to bond with Dr. Lee over fettuccine at the hospital. A perfect little lesson in privilege and allyship, wrapped in a sweet, sitcom form.