Why not just import these two functions from the optparse input_handler module? I'd rather do that than have the code duplicated