Implement Python class and function definition loop up function.