import yaml


def get_filenames(filenames_file):
    """Extract the list of file that are required for test, from the input file.

    Args:
        filenames_file (str): the path of filenames file

    Returns:
        filenames (list): the filenames extracted from the input file.
    """
    with open(filenames_file, 'r') as file:
        yaml_content = yaml.safe_load(file)
        filenames = []
        for files in yaml_content.values():
            filenames.extend(files)
    return filenames