def doors_fit_mandatory_pair(pair_list, a, b):
    for (pair_a, pair_b) in pair_list:
        if (((a.name == pair_a) and (b.name == pair_b)) or ((a.name == pair_b) and (b.name == pair_a))):
            return True
    return False
def doors_fit_mandatory_pair(pair_list, a, b):
    for (pair_a, pair_b) in pair_list:
        if (((a.name == pair_a) and (b.name == pair_b)) or ((a.name == pair_b) and (b.name == pair_a))):
            return True
    return False