def METHOD_NAME(index, rosdistro_name, build_file):
    from rosdistro import get_distribution_files
    dist_files = get_distribution_files(index, rosdistro_name)
    dist_files = build_file.filter_distribution_files_by_tags(dist_files)
    while len(dist_files) > 1:
        dist_files[0].merge(dist_files[1])
        del dist_files[1]
    return dist_files[0] if dist_files else []