def _algebraic_data(metaclass):
  """A class decorator to pull out `_list_fields` from a mixin class for use with a `datatype`."""
  def wrapper(cls):
    cls.__bases__ += (metaclass,)
    cls._list_fields = metaclass._list_fields
    return cls
  return wrapper