As a federal judge on Tuesday sets the punishment for former Virginia governor Robert F. McDonnell, he will consider legal issues as well as sweeping personal questions.

U.S. District Judge James R. Spencer will look first to guidelines that call for McDonnell to receive as much as 12 years and seven months for trading the influence of his office to a smooth-talking businessman in exchange for sweetheart loans, lavish vacations and high-end merchandise.

But the judge is not bound by those recommendations. And his ultimate decision rests, in part, on intangible considerations: How serious was McDonnell’s public corruption? What penalty might deter others in the former governor’s shoes? What weight should be given to the good the former governor has done?

The answers that Spencer comes up with will determine what penalty would amount to justice for the first Virginia governor ever to be convicted of a crime. Prosecutors want McDonnell to spend at least 10 years and a month in prison. The former governor’s attorneys believe a sentence of community service — and no time behind bars — would be sufficient.

Both sides will make their best pitches to the judge in person beginning at 10 a.m. McDonnell may offer a personal plea, as may some of his supporters. Spencer has been given more than 440 letters that friends, family members and others wrote on the governor’s behalf, urging leniency and extolling the virtues of the onetime Republican rising star.

In preparation for Robert McDonnell’s sentencing, here’s a look at sentences other politicians have faced in similar cases in recent years.

Spencer also has reviewed filings from prosecutors, who have accused McDonnell of feeling no remorse and still seeking to blame others.

McDonnell will probably not spend Tuesday night behind bars, because nonviolent offenders in white collar cases are generally given a date to report to prison on their own. His attorneys on Monday asked that he be allowed to keep his freedom until his appeals are adjudicated.

McDonnell and his wife, Maureen, were convicted in September of public corruption for lending the prestige of the governor’s office to businessman Jonnie R. Williams Sr. in exchange for $177,000 in loans, vacations and luxury goods. Maureen McDonnell is being sentenced separately in a proceeding scheduled for Feb. 20. Henry Asbill, one of the former governor’s attorneys, and U.S. Attorney Dana Boente declined to comment for this article.

The starting point for determining the former governor’s punishment is this: The U.S. probation office — the federal agency tasked with calculating a range of appropriate penalties according to the federal sentencing guidelines — has recommended that McDonnell face between 10 years and a month to 12 years and seven months in prison. There is no parole in the federal system, and if McDonnell were to be incarcerated, he would be able to reduce his time behind bars with good behavior by only 54 days a year, at most.

Spencer is not bound by the probation office’s recommendation — it is merely a technical calculation of how the office believes federal sentencing guidelines should be applied in the case — but experts say he typically heeds its advice. Prosecutors hope he does so again.

McDonnell’s attorneys countered that the probation office misstated some facts of the case and misinterpreted the law. They argued in court filings that the sentencing guideline range should have been calculated as two years and nine months to three years and five months. And they urged Spencer to impose a penalty even lower than that.

Spencer will have to settle both matters, determining whether the recommended range should be less severe and whether the sentence he imposes should fall inside of it.

List of gifts given to the McDonnell family from Jonnie Williams.

The first question is largely a technical one. The probation office increased the range of recommended penalties for McDonnell because — in the estimation of a probation officer — the former governor received multiple bribes and those bribes totaled more than $120,000. The probation office also penalized McDonnell for obstructing justice during his testimony at trial, and it did not give him credit for accepting responsibility in the case.

In court filings, defense attorneys argued that the probation office’s valuation of what the former governor received from Williams was too high, saying McDonnell should not have been assessed the full, face value of $120,000 in loans that were ultimately paid back. Defense attorneys also argued that while McDonnell might have received more than one payment, those payments stemmed from “only a single incident of bribery.”

Defense attorneys wrote that McDonnell did not obstruct justice when he testified on his behalf, saying the former governor acknowledged many of prosecutors’ factual allegations but disputed that his conduct was illegal. They argued that McDonnell deserved credit, instead, for accepting responsibility in the case.

Prosecutors disputed all of those points. They noted that Williams’s loans came with terms that were “so staggeringly bare that they barely constituted loans at all,” and they said McDonnell went to Williams repeatedly to solicit loans or bribes. They also detailed eight instances they believe showed McDonnell lying on the witness stand and said that any remorse McDonnell showed “centers on the fact that he was caught, rather than acknowledgment and responsibility for his criminal conduct.”

After Spencer determines the guideline range, he will weigh entirely different factors as he fashions what he considers an appropriate punishment. Among those that prosecutors and defense attorneys highlighted in McDonnell’s case: the nature and circumstances of his offenses, McDonnell’s personal history and characteristics, and the need to deter others from ending up in similar straits.

Their views could hardly be more divergent.

Defense attorneys urged Spencer to consider all the good the former governor had done before his conviction. They attacked the charges against McDonnell and asserted that the former governor’s trial was so public and painful that it would itself deter others from making similar mistakes.

The defense attorneys asked that McDonnell be sentenced to 6,000 hours of community service, even suggesting specific assignments that might be appropriate.

Prosecutors shot back that the former governor’s illustrious career and advanced education only made him “especially qualified to understand the gravity of his crimes.” They urged Spencer to send a message with his sentence, writing that leniency “could easily lead other public officials to believe that the potential benefits of corruption outweigh the costs.”

A former prosecutor and Judge Advocate General’s Corps officer, Spencer was appointed to the court by President Ronald Reagan in 1986. Known as a no-nonsense and efficient jurist, he took senior status on the bench last year, meaning he is now semi-retired.

Jacob Frenkel, a former federal prosecutor who now does white collar criminal defense work, said Spencer probably will not impose a decade-long sentence, but defense attorneys’ bid for only probation is something of a “Hail Mary.”

Since his September conviction, McDonnell has been leaning on friends and relatives as he has prepared for Tuesday’s hearing. Prosecutors have also revealed that he has a consulting contract that pays him $7,500 a month.

The owner of a Virginia Beach company that does plumbing and HVAC work for major construction projects confirmed that his firm gave McDonnell the contract after the trial. Rod Rodriguez, the owner of Bay Mechanical, said McDonnell has been working two to three days a week, doing sales calls and otherwise helping the company expand its client base.

Rodriguez, who has not previously donated to McDonnell’s campaigns, said he has been a friend for many years. “I just think the world of him, and whatever I can do to help, if I can afford it, I’ll be there,” he said.

If Spencer sentences McDonnell to prison, it will be up to the judge to decide how quickly McDonnell must report. On Monday, the former governor’s attorneys formally asked that he be allowed to remain free on bond during his sure-to-be-lengthy appeals. They said their appeals will raise “substantive legal questions” that would overturn the conviction or result in a new trial if the appellate court decides in McDonnell’s favor. And they noted other instances in which officials convicted of corruption have been allowed bond.

Where McDonnell is sent to prison — if he is sent — will depend on how officials classify his security level, what facilities have beds available and perhaps even his status as a high-profile inmate, said Cheri Nolan, the managing director of Federal Prison Consultants, an organization that helps people navigate the U.S. prison system.

If he is permitted to voluntarily surrender, McDonnell would be allowed to bring with him little more than his wedding band and prescription glasses, Nolan said. If he is turned over to the U.S. Marshals Service immediately, he might be handing personal effects off to family members in the courtroom.