Dr. Mary Kay Brewster bought the three- to four-foot-long python in Salinas, all cash.

According to the Contra Costa Times, the 58-year-old Monterey woman with what KSBW reports was a well-regarded gynecology practice was devastated by a split from her unfaithful husband.

Brewster's estranged spouse suffers from an extreme phobia of snakes, as prosecutors explained to the court. Seeking revenge, they argued, Brewster left the python along with several rats in the bedroom her husband shares with his new girlfriend while the couple was away on vacation.

It was the girlfriend — who has received threatening texts from Brewster and endured other harassment like poisoned plants and a mailbox destroyed by acid— who found the snake, slithering along the shutters. She "screamed and fled the residence," according to prosecutors.

"A search warrant of [Brewster's] home turned up a journal detailing [her] obsessive preoccupation and hatred of both victims," explained Prosecutor Steve Somer — presumably before immediately resting his case). Indeed Somer did prevail, and Brewster was convicted of two counts of felony stalking and one count of felony vandalism (i.e. the python part).

Now the Chronicle reports that Brewster has been sentenced to 180 days in prison and felony probation, although reports from the Contra Costa Times say it's just 150 days in the hoosegow.

The Medical Board of California has not made a decision on whether Brewster will be allowed to continue her practice when she's released. Brewster must also pay restitution to the SPCA for Monterey County: The agency is caring for the snake and one rat that survived the ordeal.

Related: Spurned Husband Allegedly Torches Groomsmen's Cars, Leaving Lube, Joker Cards