def loadString(dset):
    """!
    Load a string from an HDF5 dataset and return as a Python str object.

    Since version 3.0, h5py loads UTF8 strings as `bytes` objects.
    This function provides uniform behavior across h5py 2.0 and h5py 3.0 by
    always returning `str` objects.
    """
    s = dset[()]
    if isinstance(s, str):
        return s
    return s.decode("utf-8")