def find_compatible_door_in_list(ugly_regions, world, door, doors, player):
    if (door.type in [DoorType.Hole, DoorType.Warp, DoorType.Logical]):
        return door
    for proposed_door in doors:
        if (ugly_regions[door.name] != ugly_regions[proposed_door.name]):
            continue
        if doors_compatible(door, proposed_door):
            return proposed_door
def find_compatible_door_in_list(ugly_regions, world, door, doors, player):
    if (door.type in [DoorType.Hole, DoorType.Warp, DoorType.Logical]):
        return door
    for proposed_door in doors:
        if (ugly_regions[door.name] != ugly_regions[proposed_door.name]):
            continue
        if doors_compatible(door, proposed_door):
            return proposed_door