Python singleton decorator