Dynamically create python functions with a proper signature
