code: def create(hdf5, name, dtype, shape=(None,), compression=None,
             fillvalue=0, attrs=None):
      
      if shape[0] is None:  # extendable dataset
          dset = hdf5.create_dataset(
              name, (0,) + shape[1:], dtype, chunks=True, maxshape=shape,
              compression=compression)
      else:  # fixed-shape dataset
          dset = hdf5.create_dataset(name, shape, dtype, fillvalue=fillvalue,
                                     compression=compression)
      if attrs:
          for k, v in attrs.items():
              dset.attrs[k] = maybe_encode(v)
      return dset
docs: :param hdf5: a h5py.File object
      :param name: an hdf5 key string
      :param dtype: dtype of the dataset (usually composite)
      :param shape: shape of the dataset (can be extendable)
      :param compression: None or 'gzip' are recommended
      :param attrs: dictionary of attributes of the dataset
      :returns: a HDF5 dataset