House Speaker Nancy Pelosi took an apparent swipe at fellow Democrat Bernie Sanders over the weekend when she told a roundtable of Bloomberg News reporters that her party needed to be cautious about turning too far left and embracing a socialist agenda.

Pelosi said, “As a left-wing San Francisco liberal I can say to these people: What are you thinking? You can ask the left — they’re unhappy with me for not being a socialist.”

“Remember November,” she said. “You must win the Electoral College.”

“What works in San Francisco does not necessarily work in Michigan. What works in Michigan works in San Francisco — talking about workers’ rights and sharing prosperity,” the speaker added, saying "Protect the Affordable Care Act — I think that’s the path to health care for all Americans. Medicare For All has its complications,” arguing that “the Affordable Care Act is a better benefit than Medicare.”

Both Sanders and Senator Elizabeth Warren are calling for the party to embrace Medicare for all.

Pelosi also spoke at a Pennsylvania Democratic Party fundraiser Friday night, three years after Donald Trump’s victory in the state stunned Democrats — and focused their attention on ensuring it doesn’t happen again.

The dinner at the Pennsylvania Convention Center in Philadelphia is a key part of state Democrats’ plan to take back one of the nation’s premier presidential battlegrounds in 2020.

In beating Democrat Hillary Clinton in Pennsylvania, Trump became the first Republican presidential nominee to win Pennsylvania since 1988. For Democrats, Pennsylvania is an outsized electoral prize: Harry S. Truman in 1948 was the last Democratic presidential candidate to lose Pennsylvania but win the election.

Pelosi, speaking for 30 minutes, recounted House Democrats’ efforts in Congress, including on health care and gun control, and argued the case for Democrats’ impeachment inquiry into Trump. She also pointed to the 2020 election as a pivotal moment to vote in a Democratic president.

“We always say, ‘this is the most important election in our time,’” Pelosi told the crowd, which included Gov. Tom Wolf and U.S. Sen. Bob Casey. “How many times have you heard that? Nothing compares to this one that’s coming up.”

The impeachment inquiry, she said, is not about Trump’s personality or his policies.

“That’s for the elections to decide,” Pelosi told the crowd. “This is about our honoring our oath of office, about whether he is honoring his oath of office to protect and defend the Constitution of the United States.”

The state party chairwoman, Nancy Patton Mills, said she hopes to make the dinner a powerhouse fundraiser every year to generate money and enthusiasm right before the election.

Like the dinner, Tuesday’s election is an opportunity for the party to test some of the concepts they are trying to perfect before the 2020 election.

“Everything we’ve done since 2016 has been in the direction of never letting it happen again,” Mills said. “We’ve analyzed and we’ve analyzed our analysis to make sure it doesn’t happen again.”

Now, the party is employing a larger field staff ahead of an off-year election to build relationships with candidates for local offices, county parties, labor unions and activists, including independent progressive groups that sprung up after Trump’s victory.

Five organizers are staffed around the state to do whatever it takes to help, whether phone-banking for local candidates, showing up at events, helping get volunteers to fill county committee posts or acting as a liaison to the state party.

They are also encouraging county parties to organize candidates for local offices, so everybody campaigns for one another, as a ticket.

The hope is that those relationships and volunteer networks will be in place when the Democrats pick a nominee, with just a few months to go before the 2020 election.

Democratic Party strategists and activists have identified a few reasons they were caught by surprise by Trump’s victory in 2016. They say Clinton’s presidential campaign relied too heavily on paid media at the expense of going door-to-door to engage voters, particularly in areas beyond the Philadelphia and Pittsburgh metropolitan areas.

Some county parties had also fallen into disrepair, they say, and some county party activists felt neglected.

Had Clinton’s campaign invested more in knocking on doors, she might have won votes even in areas where she was beaten badly, party strategists say. At the very least, they say, the campaign would have known how badly she would lose in some counties.

“They never went to their doors and asked,” said Mike Mikus, a Democratic campaign strategist. “There was no human intelligence because we weren’t going to people’s doors and saying, ‘Hey, who are you going to vote for?’ And that was problematic.”

In more than half of Pennsylvania’s counties, fewer registered Democrats voted in 2016 when compared with 2012′s presidential election, while more registered Republicans voted, according to state data.

Now, the message from top party figures is the need to fight for votes in every corner of Pennsylvania.

It is having an effect, said Paul Stefano, Lawrence County’s party chairman.

At the Lawrence County Democratic Party’s picnic fundraiser a couple weeks ago, Lt. Gov. John Fetterman, Congressman Conor Lamb and state party vice chairman Sharif Street showed up.

“It’s not just us calling to say, ‘Hey, can the lieutenant governor come to our event?’” Stefano said. “They’re saying to us, ‘Are you hosting an event? We have these people ready to come.’ I look at that as a sign that we’re making contact with people on the ground, everywhere.”