code: def save(self, path, **extra):
          
          with File(path, 'w') as f:
              for key, val in vars(self).items():
                  assert val is not None, key  # sanity check
                  try:
                      f[key] = maybe_encode(val)
                  except ValueError as err:
                      if 'Object header message is too large' in str(err):
                          logging.error(str(err))
              for k, v in extra.items():
                  f.attrs[k] = maybe_encode(v)
docs: :param path: an .hdf5 pathname
          :param extra: extra attributes to be saved in the file