Anthony Brandisi, Democratic New York State Assembly member from Utica Brian Schwartz | CNBC

EARLVILLE, N.Y. — Anthony Brindisi is trying to walk a tightrope in one of the most hotly contested elections of the midterm cycle. The Democrat, who is challenging Republican Rep. Claudia Tenney for her 22nd Congressional District seat, is a critic of President Donald Trump's economic policies. But in an upstate region Trump won by 20 percentage points in 2016, Brindisi is also trying to avoid outright offending voters who still support the president. Voters have been inundated with attack ads from both candidates, and outside groups have spent record numbers on ads to influence the race. Across a broad stretch of the district, seemingly every other home has a sign in the front yard reflecting an association with different political parties, a striking visual indication that it will likely be a close contest all the way to Election Day. Nonpartisan political analysis site Larry Sabato's Crystal Ball has labeled the district a toss-up. Data analyst Nate Silver's FiveThirtyEight gives the Democrat a 60 percent chance of winning. In August, a Siena College poll had Brindisi up by 2 points but a recent survey conducted by Citizens United Political Victory Fund, a political action committee associated with conservative activist group Citizens United, has Tenney up by 8. With the race so tight, Brindisi has been careful not to weigh in too much on the biggest partisan issues of the day, such as the fight over Brett Kavanaugh's Supreme Court confirmation. Brindisi didn't rule out the possibility that the battle fired up the GOP voter base, potentially hurting him on Election Day. "Anything's possible. Certainly I think it's time for the country to move past the Kavanaugh nomination. I can't control things in the U.S. Senate. I can only control things here on the ground," Brindisi said in an interview with CNBC. A Republican strategist aligned with Tenney, who spoke on the condition of anonymity, said the GOP hasn't seen that passion subside from their internal polls as time goes by. It's been particularly evident coming from the base within the district.

It's the economy, too

On Wednesday in Earlville, Brindisi faced difficult questions about how he can help the region's struggling economy. According to a recent study by the nonpartisan think tank Empire Center, certain parts of upstate New York have seen minimal job creation over the past year. The study shows that from April 2017 through April 2018, Binghamton, a city in the district that has lost over 1,000 jobs throughout the year.

A campaign sign for NY Democratic congressional candidate Anthony Brindisi. Brian Schwartz | CNBC

"What can we do to bring this back into this place? The world needs to be fed," a dairy farmer told Brindisi at the Earville Opera House. The event was billed as a celebration of Brindisi being endorsed by Richard Hanna, a longtime 22nd District Republican representative before he retired in the run-up to the 2016 election. Tenney succeeded him in the seat. After Hanna and Brindisi made their opening remarks, they called on voters in the concert hall to step up to the microphone to let their concerns be heard. The farmer went on to explain that the dairy industry used to be the top money-making business in the district. He said he's seen firsthand how dairy farmers in his community are struggling and one of their ongoing hurdles is a lack of a comprehensive farm bill. Congress has failed to pass a bill that could give those in the agriculture industry the aide they need.

In an interview with CNBC, Brindisi cited Trump's trade war with China, Canada and Mexico as one of the issues dairy farmers continue to face. "Tariffs have hurt dairy farmers in this region," Brindisi said. "At a time when dairy farmers are already struggling with low milk prices, the tariffs have had an impact, and immigration is another issue they are struggling with as they struggle to find migrant labor," he added. He also noted that the median household income in the area is $48,000. Experts, including Iowa's Republican Agriculture secretary, Mike Naig, have said tariffs will have a negative impact on farmers and the agricultural industry as a whole.

The balancing act

The wariness to go after Trump also translates to Brindisi's messaging on certain aspects of the economy being guided by a Republican administration. He held back in criticizing the president's new trade agreement between Mexico, Canada and the United States, calling for more details before he makes up his mind. The United States-Mexico-Canada Agreement, or USMCA, is intended to replace the North American Free Trade Agreement. One of the expectations is that the new agreement will give those in the agricultural business, including dairy farmers, greater access to the Canadian market.

Claudia Tenney campaign sign. Brian Schwartz | CNBC

Congress still has to approve the deal. Republican Senate Majority Leader Mitch McConnell recently said USMCA will not see a vote until next year. Tenney, meanwhile, has often sided with the president, who campaigned for her in August. She voted to pass Trump's tax reform bill, and she hasn't held back in siding with the administration in regards to some of their trade policies. "It's a mixed bag. … It has affected us in some ways more on the crop side in agriculture and in some ways it has helped," Tenney recently told The Hill. A campaign spokeswoman said Tenney was unavailable for an interview for this story. Trump, meanwhile, made the first presidential visit to Utica in about seven decades in August. He praised Tenney during his trip: "I'm here for Claudia. She has been incredible in Congress. She has helped us so much. ... Hopefully we put Claudia right over the top where she belongs. I don't think she's going to have any problem." Still for the district, it remains unclear if that ultimate allegiance with the administration will translate into her keeping her seat on Nov. 6.