def filter_by_id(result_list_to_filter, filtering_id_field, desired_id):
    """ Given a list of results, returns only the ones that are tied to a given ID.

    Args:
         result_list_to_filter (list): list of dictionaries, containing data about entries.
         filtering_id_field: The name of the field containing the IDs to filter.
         desired_id: The ID to keep when filtering.

    Returns:
        list: A copy of the input list, containing only entries with the desired ID.
    """

    new_results_list = [result for result in result_list_to_filter if result[filtering_id_field] == desired_id]
    return new_results_list