Sunday’s episode of “The Good Fight” is a ripped-from-the-headlines episode of television about a ripped-from-the-headlines episode of television.

The newest installment of CBS All Access’ legal drama features the law firm at the show’s center agreeing to represent a television writer being sued by the network whose show he used to write on — “one of those Chicago shows,” as Cush Jumbo’s character tells Christine Baranski’s. The writer penned an episode about a thinly veiled version of Donald Trump caught in a sexual-assault scandal. But after Trump’s election as president, the unnamed (and fictional) network delayed the episode not once, but twice, with no apparent plan to actually air it.

In the real world, that is precisely what happened to a still-unseen installment of NBC’s “Law & Order: SVU.” NBC has yet to schedule an episode, shot before November’s presidential election, in which Gary Cole played a Trump-esque political aspirant who becomes swamped in sexual-assault allegations. NBC bumped the episode from its original October air date when it appeared that it would conflict with Fox’s highly rated World Series telecast. After the election, it was bumped again from its new November air date; no date has yet been set, and it is unclear at this point whether the episode will ever air. (As “SVU” star Ice-T told Vanity Fair this week, “I think they just got rid of it. I don’t know if they burned the sh-t or whatever.”)

“It wasn’t inspired by the episode — we haven’t seen it,” Robert King said of the “SVU” episode. “It was inspired by the fact that they hadn’t put it on the air yet and the subject matter is so provocative. And the fact that it was delayed not once, but twice.”

In “The Good Fight” episode, “Requiem for an Airdate,” showrunners Robert and Michelle King take plenty of fictional liberties. In their version of events, the writer posts the episode online as a form of protest, then get slapped with a lawsuit by the network. The writer’s lawyers — played by Jumbo and Delroy Lindo — argue that the network bowed to fear that the Trump administration would use the FCC as a tool to punish the network. Later, that argument is given credence when Trump tweets about the case, congratulating the network for standing up to the writer.

Still in its first season, “The Good Fight” has made regular reference to Trump. The Kings rewrote scenes from the pilot of the series, a spinoff of long-running CBS drama “The Good Wife,” after Trump was elected.

“We didn’t really feel that we were taking shots at NBC,” Michelle King said. “It was very much a generic network and the fear was that any network or entertainment conglomerate could end up being frightened by this administration.”

Spokespersons for NBC and “SVU” creator Dick Wolf declined to comment for this story. The Kings said that they did not reach out to Wolf or NBC to discuss the storyline.

They also did not talk to Gary Cole about it. In a further meta twist, Cole, who guest-starred as the Trump-like figure in the “SVU” episode, also appears in “Requiem for an Airdate.” Cole reprises his role as Kurt McVeigh from “The Good Wife,” though he does not appear in any scenes related to the “SVU”-inspired storyline.

“We didn’t have Gary on set the day those other things were filming, but we were aware of it at the time,” Michelle King said, adding that she and Robert knew that they wanted Cole’s character to appear at some point in the season, and it just happened to occur in the same episode as the “SVU”-inspired storyline. “When it seemed as though it was going to happen that way, it made us smile.”