docs: def concatenate_fields(fields, dim):
      'Create an INstanceAttribute from a list of InstnaceFields'
      if len(fields) == 0:
          raise ValueError('fields cannot be an empty list')
      
      if len(set((f.name, f.shape, f.dtype) for f in fields)) != 1:
          raise ValueError('fields should have homogeneous name, shape and dtype')
      tpl = fields[0]
      attr = InstanceAttribute(tpl.name, shape=tpl.shape, dtype=tpl.dtype, 
                               dim=dim, alias=None)
      
      attr.value = np.array([f.value for f in fields], dtype=tpl.dtype)
      return attr