code: def datum_to_value(self, instance, datum):
          
          datum = self.map_func(instance, datum)
          if datum is None:
              return None
          local_data = None
          if self.reverse is not None:
              local_data = {}
              if self.reverse is undefined:
                  local_data[instance.__class__.__name__.lower()] = instance
              else:
                  local_data[self.reverse] = instance
          # Get the class from the bound origin.
          bound = getattr(instance._origin, self.cls)
          return bound(datum, local_data=local_data)
docs: Convert a given MAAS-side datum to a Python-side value.
  
          :param instance: The `Object` instance on which this field is
              currently operating. This method should treat it as read-only, for
              example to perform validation with regards to other fields.
          :param datum: The MAAS-side datum to validate and convert into a
              Python-side value.
          :return: A set of `cls` from the given datum.