@with_read_hdf5<EOL>def empty_hdf5_file(h5f, ifo=None):
<EOL>h5f = h5f.file<EOL>if list(h5f) == []:<EOL><INDENT>return True<EOL><DEDENT>if ifo is not None and (ifo not in h5f or list(h5f[ifo]) == ['<STR_LIT>']):<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
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`