The “A Girl Walks Home Alone at Night” director tackled Noah Hawley’s universe for another crazy episode.

[Editor’s Note: The following contains spoilers from “Legion” Season 2, Episode 2, “Chapter 10.”]

Ana Lily Amirpour, director of the acclaimed “A Girl Walks Home Alone at Night” and the bonkers follow-up “The Bad Batch,” is not a filmmaker who falls meekly within any prescribed box. Therefore, she found her perfect television match in Noah Hawley’s imaginative adaptation of Marvel’s “Legion.”

“It has to be the right thing and the right type of collaboration for them to want my crazy ass to come in there and do what I can do,” Amirpour said in an interview with IndieWire. “I don’t think you can really call ‘Legion’ TV. I feel like it’s an experience. It’s about exploring sanity and madness and perception. Cinema is such a powerful way to do that.”

Amirpour came on for this season’s second episode, in which David Haller (Dan Stevens) is conflicted about helping the psychic parasite and mutant Amahl Farouk (Navid Negahban) try to find his body at Future Syd’s (Rachel Keller) request. The episode travels from a raucous carousel ride and a remote fortune teller’s booth to a no-holds-barred psychic wrestling ring and back to an undetermined time in the future. This turbulent adventure is made even stranger and more unsettling thanks to Amirpour’s particular sideways storytelling vision.

Although she had directed an episode of NatGeo’s science docuseries “Breakthrough,” “Legion” is Amirpour’s first foray into scripted TV dramas.

“One of the freeing things for me doing TV is there’s a little freedom from the attachment you have when it’s your own script,” she said. “At the same time that I’m trying to find a really cool way to do every sequence, I’m also like, ‘What do you need to get out of this?’ I want to make sure that I have Noah’s back and the writers’ backs and the show’s needs met. It was a true collaboration. The show is so psychedelic and non-linear that you just trust in each moment in a way.”

Check out the rest of the interview in which Amirpour gives her insights into key scenes from the episode, working with cats, and what’s next in her television career.

That Crazy Carousel

In the episode’s opening scene, David meets with Farouk in the guise of his last host Oliver Bird (Jermaine Clement) and Lenny (Aubrey Plaza) on the psychic plane that mimics a carousel. This kiddie carnival ride wasn’t the original plan, but an idea Amirpour brought to the show.

“In the script originally, it was an infinity escalator… an escalator that never stopped,” she said. “We obviously didn’t have that and didn’t have time to build one. I suggested a carousel because this show really gets into these different kind of expressions of madness. The carousel is the perfect personification of going around and around in your mind and trying to look for answers.”

The ride took on a nightmarish quality from the exaggerated way it was shot.

“In my films, I often have long lenses and in the show, they go for wider lenses. Doing that episode became like a place for me to fully fall in love with wider lenses,” said Amirpour. “When we showed up to that carousel, we were on a pretty wide lens, and I was just like, ‘We’ve got to make it even more distorted.’ It’s that madhouse of the mind. And then getting Aubrey that giant lollipop was just perfect, so fun.

“But I don’t envy them having to have gone around and around on that thing. I felt sick after like one turn. I got off of it.”

Killing Them Softly With Their Song

With David’s help, Farouk-Bird and Lenny infiltrate Divison 3’s headquarters where they proceed to sing and dance to “Swingin’ on a Star” (the song that played in Syd’s childhood music box) whilst walking down the hallway. With each dramatic pose or point of the finger, they make the armed guards evaporate to death or transform into a pig or fish, to follow thematically with the song’s lyrics.

This isn’t the only childhood song featured in the episode. When Kerry (Amber Midthunder) and Cary (Bill Irwin) trade places, singing the “tra-la-la” parts of “The Banana Splits” theme song helps eject him from her body.

“That [song] was something that Noah had in the script. I’d actually never heard of it until we did this, so then I looked it up,” said Amirpour. “I think it’s like a very white American growing up cultural thing because I’m an Iranian immigrant. I think the first thing that I kind of latched onto when I came here was Michael Jackson and Eddie Murphy and stuff like that. But those were both in the script.

“I plan for music when I do my stuff too,” she said. “With Bill and Amber doing the singing duet and rehearsing the ‘la-la-la’ together, it’s just fun for them because… music just helps you feel so much about what it’s going to be like. Same with [Farouk and Lenny] in their little killing duet. It’s just like got a certain vibe and Frank Sinatra swagger.”

Farouk and Farsi

Later, Farouk rids himself of the Oliver Bird facade and wears his Egyptian host’s appearance when he meets up with David at a fortune teller’s booth in the desert. Here, Amirpour was able to play with the vastness of the location shoot at Mystery Mesa in Santa Clarita, just northeast of Los Angeles.

“The desert is my natural habitat. I belong in the desert. I’m Iranian, after all,” she said. “There were a few times we used [the crane shot]. We were way up high in the sky and we go all the way across the sky down to the table. That was such a sick shot and a massive setup. And then the other time was when David wakes up in the desert and you’re in close on his face and it’s going in the grass and up high.”

Beyond the visuals, Amirpour played with how the dialogue was delivered in these scenes, specifically having the Iranian Negahban switch from English to Farsi (with English subtitles) and back again repeatedly. Because this all occurs within the mind, David has no problem following along.

“Whenever I meet a filmmaker who absorbs the true aspects of the human actor into the character, that’s what I love. It’s like the nuances of that actual person coming out because that’s who Navid is and that’s the language he speaks,” said Amirpour. “There’s reasons for it story-wise and casting-wise. It just also makes them larger than life in a way. It’s not about English or understanding in one language or in one reality. I think it supersedes language.”

The show plays with this idea further when Lenny’s character pleads with Farouk to be let go and even drops a Farsi phrase herself.

Amirpour said, “She’s also outside. Everyone’s kind of communicating outside of the regular boundaries of us mere mortals. It’s another level. [Plaza] did a good job even with the pronunciation.”

Bigger Than Jesus Smackdown

Although Amirpour called it “larger than life,” Farouk tries to convince David that they’re both so powerful and able to bend reality that they’re “bigger than Jesus,” to paraphrase John Lennon. The most striking example of this is when the two decide to duke it out in a psychic wresting match, in which they each change form to constantly one-up each other.

“That scene was so fun. Are you kidding? Two guys in wrestling singlets, wrestling and talking shit to each other. The crazier and funner it is, and visually stimulating it is, the more fun I have,” she said.

“It’s a massive, giant soundstage with infinite fall off to black space. It’s like such a cool space to be in. Then, you know, you have these colorful wrestling singlets on these guys, it’s just so visually stunning. Just already, even from the storyboard I knew how it was going to be. It’s just like so striking, the colors. It’s so fun to just have those guys dance around each other.”

Catty Co-Stars

FX

Mutant wrestling and shape-shifting aside, perhaps the looniest, most delightful scene in the episode occurs when David goes to speak to Syd on the rooftop. Only Syd has switched her consciousness with a cat, and therefore her human form is arching and crouching over a dead bird (Amirpour’s idea) while the fluffy Himalayan speaks psychically with her voice.

Amirpour has had plenty of experience working with cats. In “A Girl Walks Home Alone at Night,” the cat Masuka stole many scenes because of its curious nature and expressive eyes, prompting her to dub hi the “Marlon Brando of cats.”

“On ‘Girl Walks,’ Masuka always, always exceed my expectations,” said Amirpour. “But I was always prepared to deal with what I would have to shoot to cut around if the cat did something unpredictable from take to take. And I kind of did the same thing here. On one take of a scene I did multiple cameras on that scene. It’s so handy to have two cameras because it covered your ass.

“The cat [Samson] did a pretty damn, good job, I think,” she said. “It was funny to watch Dan Stevens like having the conversation with the cat. I’m not going to lie. There’s definitely a massively giddy amount of entertainment of just watching him do take, after take, after take of kind of pleading with this cat. It’s intense pleading, too. He’s questioning this cat, really earnestly and he had to kind of bend down to get like eye level with the cat.”

What’s Next

If “Legion” returns for a third season, Amirpour would gladly return to direct “in a heartbeat.”

“It’s an ideal place to just try out anything,” she said. “I did zolly shots, I did massive techno-crane stuff, I did a million things that, a lot of times on indie films it’s like, ‘No, no, no. Can’t do it.’ Here, the crew of ‘Legion’ and the cast, it’s like this well-oiled machine that makes it possible for you to execute your wildest dreams in a short amount of time.”

In the meantime, she already got another TV episode under her belt with Hulu’s upcoming “Castle Rock.” From J.J. Abrams and Stephen King, the psychological horror series is set in the fictional Maine town of Castle Rock that includes the mythological and character hallmarks of King’s short stories.

“I did a really fun episode of that. It’s Bad Robot, and it’s the same kind of thing, different type of show and people, but the same level of commitment to just art,” she said. “They want directors. Sometimes with TV, they just want someone to come in and do what’s already been done like 100 times before. And sometimes they really want your viewpoint and way of building suspense and telling a story and doing action.

“In this medium, visual storytelling, a lot of people play it safe. I personally define a true artist as someone who is exploring and inventing,” she said. “That means that whatever the result is, it’s not established, it hasn’t been there before. We’re looking to find something.

”Legion” airs Tuesdays at 10 p.m. ET on FX.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.