code: def datum_to_value(self, instance, datum):
          
          if datum is None:
              return []
          if not isinstance(datum, Sequence):
              raise TypeError(
                  "datum must be a sequence, not %s" % type(datum).__name__)
          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.Managed(
              instance, self,
              (
                  bound._object(
                      self.map_func(instance, item), local_data=local_data)
                  for item in datum
              ))
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.