The actor co-wrote the classic BBC sitcom with his ex-wife.