What has four paws, a wagging tail, and just spent a month behind bars? Sora, a 1-year-old, 47-pound female terrier mix.

On Monday, she graduated from Pups at the Pen with her inmate trainers.

Pups at the Pen is a program run by the SPCA and the Erie County Sheriff's Office.

Dogs from the SPCA are sent to live with female inmates at the correctional facility. From there, they are trained with basic obedience skills, like sit, stay, and come.

Inmates get trained weekly by a staff member of Sit n' Stay Pet Services in Orchard Park.

After their training is up, they then become better adoption candidates than they might have been when they first arrived.

"We're committed to providing inmates opportunities to better themselves while they are in custody. The easiest thing to do while running a facility like this is let them watch TV or read books or what have you. But this is something very programmed, very progressive, and it really provides the inmates a sense of responsibility, accountability," said Thomas Diina, Erie County Sheriff's Jail Management Division superintendent.

Sora has already found her forever home — Diina adopted her.