Fix PythonFiled in function_factory.