code: def empty_hdf5_file(h5f, ifo=None):
      
      # the decorator opens the HDF5 file for us, so h5f is guaranteed to
      # be an h5py.Group object
      h5f = h5f.file
      if list(h5f) == []:
          return True
      if ifo is not None and (ifo not in h5f or list(h5f[ifo]) == ['psd']):
          return True
      return False
docs: Determine whether PyCBC-HDF5 file is empty
  
      A file is considered empty if it contains no groups at the base level,
      or if the ``ifo`` group contains only the ``psd`` dataset.
  
      Parameters
      ----------
      h5f : `str`
          path of the pycbc_live file to test
  
      ifo : `str`, optional
          prefix for the interferometer of interest (e.g. ``'L1'``),
          include this for a more robust test of 'emptiness'
  
      Returns
      -------
      empty : `bool`
          `True` if the file looks to have no content, otherwise `False`