Lost in the flurry of several hotly contested races in the November election, state Sen. Anthony Williams sailed easily to victory.

His challenger? Nobody.

Still, the four-term senator’s cruise to office didn’t come cheap. His campaign account dropped nearly $250,000 this year on a range of expenses.

Williams wasn’t the only one to spend big in a largely unscrutinized reelection bid. He was one of 15 Democrats in Philly who secured no-contest victories in both the primary and general elections this year. An additional seven candidates bested primary challengers and went on to be the lone ballot option in the general.

These guaranteed victors nonetheless raised and spent money. A bunch of it. Collectively, unopposed Dems raked in over $1 million dollars on the campaign trail — and spent roughly the same. What exactly does a candidate without opposition do throughout the campaign season?

A Billy Penn analysis of campaign finance records found a variety of paths taken. Many candidates with no challengers spent tens of thousands on get-out-the-vote efforts for other competitive races. Some opted to dole out cash Daddy Warbucks-style, dropping thousands on meals or otherwise sharing their wealth to boost allies whose races were expected to be close.

Both city and state campaign finance laws are notoriously broad in their definition of a valid campaign expense. Ethics violations most often arise from a candidate’s failure to disclose money coming in or going out. Even so, political watchdogs caution that candidates running unopposed would do well to make face with voters — and watch how how they spend their donors’ dollars.

“More than one elected official has been skewered on the spit for elaborate dinners and cocktail parties and $100 cheesesteaks,” said David Thornburgh, president of political reform group Committee of Seventy, “If the only public appearances you make are for lavish dinners with jumbo shrimp and expensive bottles of wine, you may have a problem.”

Bill it to the campaign

Williams out-raised and out-spent all of his unchallenged colleagues. His war chest expensed high-priced campaign consultants, fundraisers, political contributions — and even a $32,800 “survey” by Republican-leaning polling firm McLaughlin & Associates, an expense likely testing the water for a challenge against Mayor Jim Kenney next year. (Williams did not return multiple requests for comment.)

State Rep. Jordan Harris, while he faced no opponent on the ballot, was running for another kind of election: leadership in the House of Representatives. Soon after Election Day, he was tapped to be minority whip, the No. 2 position for Democrats in House of Representatives.

The rising star lawmaker had a busy year on the so-called campaign trail, spending over $83,000 despite not having a challenger. More than $10,000 went toward Uber rides and other transportation expenses. “You know how expensive it is to drive in Philly,” Harris told Billy Penn.

To his credit, Harris did spend generously on GOTV operations in his district, which includes parts of South and Southwest Philly. But his campaign also dropped more than any other on one-off meals: $6,800. Outings ranged from single-digit checks at Arby’s to heftier tabs at Del Frisco’s in Center City, a surf-and-turf hub for Philly’s politically wired. He even recorded a random $28 expense at Cassell’s Hamburgers in Los Angeles this summer. On top of that, filings show Harris reimbursed himself for more than $10,400 from his campaign account, which he said was compensation for other campaign-related transportation and meals.

Culinary rites in Philly politics are apparently different from those in The Sopranos, where the boss passes the restaurant tab onto the lower-ranking family members.

“I’ve got a little seniority, so when the check comes I take care of it and pay for it, whether its with Black Caucus members or other members of the Philly delegation, or other business meetings,” Harris said. “It’s customary for the leader to pick up the tab.”

State Rep. McClinton is another newer face in the Democratic delegation in Harrisburg, where she recently became the first black woman to be elected caucus chair. In Northwest Philly, McClinton’s campaign raised more than $58,000 this year and spent roughly the same amount, including for a combination birthday party/fundraiser at a historic building in her district and $113 for tickets to a play. Those tickets were donated to students in her district, McClinton said via email, allowing them to experience “a powerful African-American theatrical production” they otherwise would not have encountered.

In the Northeast, Rep. Ed Neilson surpassed all of his House colleagues in campaign spending at nearly $90,000 — tens of thousands of which went to Democratic candidates and committees to support contested elections.

This was a common practice among candidates who ran unopposed campaigns this year, and it makes sense. Political consultants say attending fundraisers and rallies for other candidates not only keeps an incumbent in the public eye, but also shores up their alliances for the always-precarious future.

Don’t upset the donors

Aubrey Montgomery, a well-known fundraiser at Rittenhouse Political Partners, compares running an uncontested campaign to training in the off-season.

Most incumbents don’t know whether they’ll face a challenger until a few months before any election day. But the savvy politician should always thinking like a candidate — which means keeping in touch with prominent donors and spending money to keep your name in good public accord.

None of this money comes from taxpayer dollars, which can be a common misconception. Candidates in Philly can spend money from their campaign accounts on nearly anything that can be argued to boost their election chances, so long as the expenses aren’t demonstrably for personal use. Stretching the generous limits of what constitutes a “campaign expense” has landed pols in hot water before. Former District Attorney Seth Williams’ corruption case, for example, pivoted around billing his campaign account for a top-dollar gym membership in Center City. The argument from his lawyers? That “trimming down” helped the now-jailed pol stay electable.

Gray area aside, it’s more often donor perception that a high-rolling campaign should be worried about, consultants say.

“Do I hear criticism from donors about gym memberships [not] being a good political use of resources? Yes,” Montgomery said.

Montgomery added that some donors express concern about the often blurry line between constituent services and electoral work. City Councilman Bobby Henon routinely dips into his campaign account to help fund neighborhood summer camps and improve civic facilities. Neither city nor state campaign laws do not explicitly prohibit this form of political philanthropy, though critics have boohooed the practice over the years.

Campaigning for democracy?

On the other hand, Montgomery emphasizes that maintaining a robust campaign operation as an unopposed candidate can also help boost overall turnout.

“Any work that you do to turn our people to support you also helps people who stay in the booth and vote for governor,” Montgomery added. “Just because you’re running unopposed doesn’t mean you’re not bringing people to the polls.”

Political insiders agreed fundraising for peers and funding get-out-the-vote operations are both viable ways for unopposed candidates to maintain a presence. Philadelphia saw an eye-popping 51 percent voter turnout on Nov. 6, a muscular showing compared the last midterm election cycle in 2014, for which only 34 percent of registered voters bothered to show up at the polls.

“This year we saw a number of state House and Senate members take a more active role in assisting campaigns,” said Adam Erickson, founder of political consulting firm Princeton Strategies. “Elected officials also focused on getting the vote out in their own district to assist the statewide candidates.”

All told, that effort totaled more than $812,000 between 15 uncontested campaigns this year. The seven Democratic candidates who weathered primary battles but did not face challengers in the primary added to the total, spending more than $120,000 between the primary and general elections.

Danilo Burgos, the representative-elect in North Philly’s 197th District, does not appear to have submitted any campaign finance reports to the Department of State. He told Billy Penn his campaign raised and spent around $40,000 this year.

Incumbent Rep. Vanessa Brown, who was handily reelected ahead of an October corruption trial that would end with a jury convicting her on bribery charges, filed just one campaign finance report in June. Her account showed just $500 in cash and no recorded expenses for the entire year, despite having faced a challenger in the primary election.

For Thornburgh at the Committee of Seventy, the situation of uncontested campaigns as a whole represents a larger problem. Nearly two dozen no-contest elections for state legislative seats is a bad sign of healthy democracy, he says. The city’s Democratic party has seen an influx of progressive insurgents who have bested party-backed candidates in recent years. Still, insider baseball continues to dominate small district races, discouraging outsiders from running for office.

Thornburgh said peer cities see far more contested elections than Philadelphia does, both for municipal and state district races.

“That’s just not healthy,” Thornburgh added. “We’d always rather see more competitive races rather than fewer.”