how to create a dictionary of functions in python