code: def clips_value(self, dvalue):
          
          try:
              return VALUES[type(dvalue)](self._env, dvalue)
          except KeyError:
              if isinstance(dvalue, (list, tuple)):
                  return self.list_to_multifield(dvalue)
              if isinstance(dvalue, (clips.facts.Fact)):
                  return dvalue._fact
              if isinstance(dvalue, (clips.classes.Instance)):
                  return dvalue._ist
  
          return ffi.NULL
docs: Convert a Python type into CLIPS.