code: def set_nbytes(self, key, nbytes=None):
          
          obj = super().__getitem__(key)
          if nbytes is not None:  # size set from outside
              obj.attrs['nbytes'] = nbytes
          else:  # recursively determine the size of the datagroup
              obj.attrs['nbytes'] = nbytes = ByteCounter.get_nbytes(obj)
          return nbytes
docs: Set the `nbytes` attribute on the HDF5 object identified by `key`.