Ms. Pelosi has already said that she’d give others the spotlight when it came to the public part of the job. In the past, she has not been a regular on TV news shows, including the prestigious Sunday shows. Since 2007, when she became speaker of the House, she has had a couple of chances to give the response to the president’s State of the Union address, one of the most coveted television spots in politics, but she took neither one. Those spots went to two men: Senator Jim Webb of Virginia in 2007 and, in 2018, Representative Joseph Kennedy III of Massachusetts.

Even her detractors say that she’s best at one of the most critical, if not most critical, roles of speaker, which is to court votes and count votes. Counting is a lot more complicated than conducting a survey. It involves understanding the political challenges of each and every member of Congress and then devising a legislative package that can pass. Sometimes this entails compromise; sometimes this entails structuring the vote so that a member can cast a vote against an amendment and sometimes this entails allowing a member to vote against their party — if it already has the votes to prevail.

Ms. Pelosi has shown her toughness over and over. For instance, in 2005, she played a central role in the battle against privatizing Social Security. For the Affordable Care Act, she united both the left and right wings of her caucus. Later, as minority leader, she managed to keep the caucus together enough to prevent the Republican Congress from chipping away at Obamacare.

Like Lyndon Johnson, a Senate majority leader who eventually rose to the presidency, Ms. Pelosi is a machine politician with a progressive bent. To court votes, an effective legislative leader cannot stick to an overtly ideological line. If she were rigid, she wouldn’t be able to hold together a caucus that consists of conservative “blue dogs” and “democratic socialists.”

Finally, a speaker has to be able to win majorities. In the midterms, Ms. Pelosi and her leadership partner Steny Hoyer of Maryland were a very big part of the reason that the party gained at least 39 seats. Mr. Hoyer recruited and campaigned with candidates from the purple or red districts where Ms. Pelosi was viewed as too liberal. She helped raise the millions to make it all happen. They both imposed a stern message of discipline on their candidates, downplaying talk of impeachment and focusing Democrats on pocketbook issues like health care.