Dynamically assigning function implementation in Python Dynamically assigning function implementation in Python python python