def find_carg_coverages(carg_node_list, reference_coverage, coverages):
    """
    Find CARG coverages by searching coverages for the ones with 1 in exactly the places carg requires it to be and nowhere else.
    e.g. CARG is in node_id 2, reference coverage is [0,1,2,3], CARG coverages are [0,0,1,X0], [0,0,1,0] but not [0,1,1,0] or [0,1,X0,0]
    :param carg_node_list: List of node ids corresponding to a single CARG
    :param reference_coverage: List of node ids in order which coverages are constructed
    :param coverages: List of coverages obtained by running rule application
    :return: List of coverages corresponding to the give CARG
    """

    # CARG node positions in reference
    carg_node_positions = [reference_coverage.index(node_id) for node_id in carg_node_list]

    carg_coverages = []

    # Search rule application coverages that have 1 in exactly those coverages and nowhere else
    for coverage in coverages:
        if not all([True if coverage[index] == '1' else False for index in carg_node_positions]):
            continue

        if sum(1 for node in coverage if node == '1') != len(carg_node_positions):
            continue

        carg_coverages.append(coverage)

    return carg_coverages