It was 6 am, just a few weeks after Donald Trump had moved into the White House — and there was a light on in the East Wing. It was possible that Trump, notoriously an early riser, was in the residence watching Fox & Friends. It was his favorite morning show, one that he praised publicly, often tweeting about a segment right after it aired.

But the hosts of the show wanted to know for sure.

So they told the president: If you're watching, flicker the lights to let us know.

There was no movement.

The hosts wondered if maybe Trump needed time to run down the hallway from his bedroom, where he was watching the show. Surely that's why the president of the United States wasn't playing with the light switch for them.

But lo and behold, about eight minutes later, co-host Steve Doocy said, "Let's see if the lights are flickering at the White House." On cue, the lights in the East Wing turned on and off.

The hosts burst into joyous laughter.

"Thank you, Mr. President," co-host Ainsley Earhardt said.

Soon thereafter, Doocy admitted it was a prank: "It's a video effect. We didn't actually do that." What might've been one of the more astounding moments in cable news was actually fake. Still, this gag was prescient, giving us accurate insight into how Fox & Friends would evolve in a Trump presidency.

Since Trump was elected, Fox & Friends has taken a special place in the media landscape. It’s clear that the program is in something of a feedback loop with the president. But contrary to what CNN president Jeff Zucker says, this isn't state-run television "extolling the line out of the White House." Scholars tend to say state-run media usually aims to keep the rank and file in line, while demobilizing the populace and deflating political opposition. Most of it is very boring. Watch some live Chinese state-run media and you'll immediately understand.

We analyzed 17 months of Fox & Friends transcripts, which captures nearly a year before Trump was elected president and about six months after. (More on the methodology at the bottom of this piece.)

What we found is that Fox & Friends has a symbiotic relationship with Trump that is far weirder and more interesting than state media. Instead of talking for Trump, they are talking to him.

The regular hosts — Steve Doocy, Brian Kilmeade, and Ainsley Earhardt — and their rotating cast of guests increasingly view their role as giving advice to the president. They prognosticate on what the president, his staff, or his party should do. And it’s all couched in language that makes it seem they are on his side — that the damning news reports from mainstream media were unfair obstacles to his presidency.

That is in contrast to what Fox & Friends was before Trump. In 2013, media scholar Jeffrey P. Jones argued that Fox & Friends creates an ideologically homogenous community and reinforces it by creating a high school-like atmosphere. "The show is designed to thrust the viewer into a common-sense groupthink, complete with all the rumours, smears, innuendo, fear-mongering, thinly veiled ad hominem attacks, and lack of rational discourse they can muster — you know, just like high school," he writes.

But in the 2016 election, the man who loves their show and listens to their political and cultural ruminations became the leader of the free world.

Fox & Friends went from being the bully on the periphery to the prom king’s posse.

Subtle signs they want to be Trump’s BFF

Before Trump became the Republican nominee for president, Fox News had a somewhat adversarial relationship with Trump. He was an outsider, a former Democrat, a reality TV star — and not always good at getting in line with the Republican Party. In fact, one of his signature moments in the primary was taking down Jeb Bush, the establishment candidate.

But Fox & Friends was always friendlier to Trump, a frequent caller to the show, and its coverage was a preview of how the rest of the network would evolve.

The show’s hosts were always good at making Trump feel like they were on his side, but once he won the presidency, Fox & Friends ramped up this rhetoric, whether consciously or not.

They started using “we” statements with a lot more frequency, hinting that his goals and his identity were somehow tied to theirs.

And they quickly started referring to him as merely “the president” — something they didn’t always afford to President Obama.

Connotation is a lot harder to pin down on television, much less in transcripts, but a review of several instances show that saying “the president” often seemed to drive home the idea that Trump won the election, fair and square.

Fox & Friends may have evolved this way because the Republican Party took over both chambers in Congress and the White House. But it also serves to send a constant signal to the president that they are on his side, and to frame news stories for their viewers in that context.

Whispering in Trump's ear

The symbiotic relationship Fox & Friends has with the president can get complicated, particularly as tensions mount around the Russia scandal and the firing of FBI Director James Comey.

That’s because the show wants to paint Trump in a favorable light, but it also wants to be a news source to inform its viewers.

The way Fox & Friends gets around this tension is clever — and weird.

In May, after President Trump fired Comey, the hosts talked about what Trump should do about the Republicans who wanted to hire a special prosecutor to investigate him.

KILMEADE: I think it would have been good for the president to work the phones, because he is the best at that: "Listen, this is my school of thought — this is what I'm looking to do. We all know the Russia investigation is going nowhere. How do I get this done with the least amount of ancillary damage?" EARHARDT: Here is the bottom line: He is the boss. And he gets to decide who works for him. Someone who works for him who is not supportive of him, he gets rid of them. He has the ability to do that.

The hosts are basically telling Trump what they would do in this situation. They are covering the news by advising him.

It's something the show's hosts and guests have done with far more frequency since Trump has been in office. An analysis of the show's transcripts reveal that about 8 to 9 percent of sentences before Trump's election were imperative sentences, which instruct or advise. In the first few months of his presidency, that number increased more than 50 percent.

The analysis also shows that the people on the show increasingly assured their guests about the future. There's been a massive uptick in the number of times people say that people are "going to do" something, whether that's Trump or Republicans or whoever else they may be talking about. It's often part of them gaming out scenarios, or assuming they know the president well enough that they can predict he'll act a certain way.

After Comey was fired, the hosts predicted that some Congress members would call for a special prosecutor — but wouldn't get one because there's not enough evidence.

It seems as though the show's primary goal is no longer to talk to an audience — but rather to talk to the president. Before Trump, Fox & Friends would often attribute arguments to "some people" as a way to create straw men or make an anecdotal argument.

But as the show's coverage shifts to an advisory session for Trump, these kinds of arguments have decreased:

One consequence of covering these stories with suggestions to Trump is that often it obscures what the real story is. In Fox & Friends’ framing, the Russia investigation is an obstacle to overcome, rather than an undertaking that could possibly reveal something about Trump's relationship with Russia. And Comey is an unruly subordinate whom Trump has to deal with.

In May, when special counsel Robert Mueller was appointed to look into the Trump campaign’s ties with Russia, the hosts talked about how the president could move the news cycle past this.

DOOCY: Donald Trump is chomping at the bit to get stuff done, and he made it very clear. He has this list of stuff, he wants to get it done, and now it’s Robert Mueller there. Maybe this investigation will finally be done quickly and effectively and aboveboard.

Kilmeade had more tangible suggestions for how Trump could move past this:

I would like to see us start debating health care again. I think the next thing the president should do, besides pushing tax reform, is start doing some infrastructure. ... So let’s start doing that, and that’s where the Democrats will have to get off their butts, because that’s what they ran on.

A few weeks later, the White House announced it was Infrastructure Week.

But this obfuscation is different than on Fox News's other shows or the Fox News website. We've done an analysis of that coverage and found that they often try to frame these stories in ways that blame political opponents and the mainstream media. For Fox & Friends, that is a given. The real challenge is figuring out how to help Trump get past those obstacles.

The hope that he’s still listening

After Comey testified before the Senate Intelligence Committee, Fox & Friends ran a segment showing how the mainstream media unfairly portrayed the testimony as bad for Trump:

HARRIS FAULKNER (HOST): Major bombshells coming out of yesterday’s hearing, like Loretta Lynch telling James Comey to call the Hillary Clinton emails a “matter” instead of an “investigation,” and that Comey orchestrated leaks of his own memo to the press through a friend. The media, however, focused elsewhere.

Right as this segment aired, Trump tweeted the following:

Great reporting by @foxandfriends and so many others. Thank you! — Donald J. Trump (@realDonaldTrump) June 9, 2017

The hosts and producers know they have Trump's attention, and they are catering their show to be a kind of brainstorming session with him. And Trump knows he'll find an empathetic community watching Fox & Friends, so he continues to tune in.

Fox & Friends is a show about how Trump could best fare given the circumstances, but it’s done under the guise of news coverage. It creates enemies and allies based on this framing, and it chalks up wins and losses based on these goals.

Trump has long talked about how unfair the media is. He’s started fake wars with the media to create entertaining storylines, much like we see in pro wrestling — or even his reality show, The Apprentice. It’s also long been rumored that he wants to start his own television or online news outlet, and he’s even started a “real news” segment, starring his daughter-in-law, which is distributed on his Facebook page. He sees most media outlets as enemies with which he can have a mutually beneficial relationship — he gets attention, and they get readers and viewers. But that also means when he is really in trouble, they don’t stick by him.

Fox & Friends, though, is loyal.

In exchange, Trump praises their coverage. It’s affirmation that they have influence — that he’s still listening.

They are his posse, sticking by him no matter what he says or does. And they spend their days hoping to say the right things so he'll flicker the White House lights for them.

Methodology: We started with transcripts of from every Fox & Friends show between January 2016 and May 2017 from the Internet Archive's TV News Archive. Then we wrote a computer program to clean the files to only include words spoken on the show. The program then sifted out commercials by looking for areas where the transcript repeats a chunk of eight-words phrases in verbatim at least five times, since commercials are the same each time around. A cursory review revealed that we caught almost all the commercials, though a negligible number did made it through. From there, we used the library Pattern.en to analyze parts of speech and types of sentences used over time (imperative, declarative, etc.). We also used the Natural Language Toolkit to sort words by part of speech and Vader Sentiment to again analyze sentiment, which helped inform the direction of the piece but was not used in the final piece.

The Trump-Fox & Friends feedback loop, explained