code: def extend(self, key, array, **attrs):
          
          try:
              dset = self.hdf5[key]
          except KeyError:
              dset = hdf5.create(self.hdf5, key, array.dtype,
                                 shape=(None,) + array.shape[1:])
          hdf5.extend(dset, array)
          for k, v in attrs.items():
              dset.attrs[k] = v
          return dset
docs: Extend the dataset associated to the given key; create it if needed
  
          :param key: name of the dataset
          :param array: array to store
          :param attrs: a dictionary of attributes