code: def define_function(self, function, name=None):
          
          name = name if name is not None else function.__name__
  
          ENVIRONMENT_DATA[self._env].user_functions[name] = function
  
          self.build(DEFFUNCTION.format(name))
docs: Define the Python function within the CLIPS environment.
  
          If a name is given, it will be the function name within CLIPS.
          Otherwise, the name of the Python function will be used.
  
          The Python function will be accessible within CLIPS via its name
          as if it was defined via the `deffunction` construct.