Python Create Function Dynamically Typed Language Definition