NBC has given a pilot order to a single-camera comedy from Gary Sanchez Prods. to star Kate Walsh as a hard-living judge.

"Bad Judge" hails from scribe Chat Kultgen, who has fielded comedy pilots for FX, CBS and ABC in recent years. Walsh plays a sexually unapologetic woman who lives on the edge despite her job as a criminal court judge.

Kultgen exec producers for Universal TV with Gary Sanchez's Adam McKay and Will Ferrell along with Anne Heche, Jill Messick and Walsh.

Gary Sanchez Prods. also scored an early pilot pickup from NBC this summer for its project with Krysten Ritter, "Assistance."

Walsh wrapped six seasons of ABC's "Private Practice" last season.

2013 Variety Media, LLC, a subsidiary of Penske Business Media; Distributed by Tribune Content Agency, LLC