NBC has handed an early pilot order to Bad Judge, a single-camera comedy starring and executive produced by former Private Practice star Kate Walsh. The single-camera project, from Will Ferrell and Adam McKay’s Gary Sanchez Prods and actress Anne Heche, was written by Chad Kultgen (The Incredible Burt Wonderstone) based on an idea brought to Gary Sanchez by Heche. It centers on a hard-living, sexually unapologetic woman (Walsh) who plays with the law, and whose life on the edge is constantly in balance as she also happens to be a judge in the criminal court system. Universal TV, where Gary Sanchez Prods. and Heche have deals, is producing. Heche and Jill Messick executive produce alongside Walsh, Kultgen, Ferrell and McKay. Bad Judge was a late pitch buy last development season, and emerged as a contender for an off-cycle pilot order in March when Walsh started circling the project.

Following the end of Private Practice last January after six seasons, Walsh had been pursued for pilots, indicating that she was interested in a comedy vehicle. She has a relationship with McKay and Ferrell having done several videos for their comedy site Funny Or Die. Last season, Gary Sanchez produced another NBC single-camera comedy pilot with a female lead, Assistance starring Krysten Ritter, which was left in contention past May. Heche, who recently starred in NBC’s comedy series Save Me, has been active as a producer this season, selling a couple of projects, including a Colette Burson comedy at NBC she may star in. She is repped by UTA and Untitled.  CAA-repped Walsh just wrapped the Courteney Cox-helmed pic Just Before I Go. Gary Sanchez is with CAA and WME; Kultgen is with CAA. NBC already has one new comedy series set for next season, the Tina Fey/Robert Carlock project starring Ellie Kemper, which received a 13-episode straight-to-series order. On the drama side, NBC has pilots Babylon Fields, from Michael Cuesta, Gerald Cuesta and Michael Atkinson; Tin Man, from feature writer Ehren Kruger; and Odyssey, co-written and directed by Peter Horton.