def METHOD_NAME(
    filename, dataset_key=None, hardlinks_only=False, verbose=True
):
    """
    Read from a NeXus or ``.hdf`` file and return a list of the dataset paths.
    This method is used to inspect the contents of an hdf5 file.
    The method iterates through group attributes and returns NXdata or
    hdf datasets of size >=2 if they're not already NXdata blocks
    and returns a list of the entries.
    This is a convenience method to inspect a file to list datasets
    present rather than loading all the datasets in the file as signals.
    Parameters
    ----------
    %s
    dataset_key : str, list of str, None , default=None
        If a str or list of strings is provided only return items whose
        path contain the strings.
        For example, dataset_key = ["instrument", "Fe"] will only return
        hdf entries with "instrument" or "Fe" somewhere in their hdf path.
    hardlinks_only : bool, default=False
        If true any links (soft or External) will be ignored when loading.
    verbose : bool, default=True
        Prints the results to screen.
    Returns
    -------
    list
        List of paths to datasets.
    See Also
    --------
    rsciio.utils.hdf5.read_metadata_from_file : Convenience function to read
        metadata present in a file.
    """
    search_keys = _check_search_keys(dataset_key)
    fin = h5py.File(filename, "r")
    # search for NXdata sets...
    # strip out the metadata (basically everything other than NXdata)
    nexus_data_paths, hdf_dataset_paths = _find_data(
        fin, search_keys=search_keys, hardlinks_only=hardlinks_only
    )
    if verbose:
        if nexus_data_paths:
            print("NXdata found")
            for nxd in nexus_data_paths:
                print(nxd)
        else:
            print("NXdata not found")
        if hdf_dataset_paths:
            print("Unique HDF datasets found")
            for hdfd in hdf_dataset_paths:
                print(hdfd, fin[hdfd].shape)
        else:
            print("No HDF datasets not found or data is captured by NXdata")
    fin.close()
    return nexus_data_paths, hdf_dataset_paths