import glob


def setup_filepaths(data_path, participant_numbers):
    """Set up filepaths for reading in participant .h5 files.

    Args:
        data_path (str): path to directory containing .h5 files
        participant_numbers (list): participant numbers for filepaths

    Returns:
        list: filepaths to all of the .h5 files
    """
    all_filepaths = []
    for participant_number in participant_numbers:
        filepaths = glob.glob(data_path + "/" + participant_number + "_*.h5")
        all_filepaths += filepaths
    return all_filepaths