def handle_split_dungeons(dungeon_builders, recombinant_builders, entrances_map):
    for (name, split_list) in split_region_starts.items():
        builder = dungeon_builders.pop(name)
        recombinant_builders[name] = builder
        split_builders = split_dungeon_builder(builder, split_list)
        dungeon_builders.update(split_builders)
        for (sub_name, split_entrances) in split_list.items():
            sub_builder = dungeon_builders[((name + ' ') + sub_name)]
            sub_builder.split_flag = True
            entrance_list = list(split_entrances)
            if (name in flexible_starts.keys()):
                add_shuffled_entrances(sub_builder.sectors, flexible_starts[name], entrance_list)
            filtered_entrance_list = [x for x in entrance_list if (x in entrances_map[name])]
            sub_builder.entrance_list = filtered_entrance_list
def handle_split_dungeons(dungeon_builders, recombinant_builders, entrances_map):
    for (name, split_list) in split_region_starts.items():
        builder = dungeon_builders.pop(name)
        recombinant_builders[name] = builder
        split_builders = split_dungeon_builder(builder, split_list)
        dungeon_builders.update(split_builders)
        for (sub_name, split_entrances) in split_list.items():
            sub_builder = dungeon_builders[((name + ' ') + sub_name)]
            sub_builder.split_flag = True
            entrance_list = list(split_entrances)
            if (name in flexible_starts.keys()):
                add_shuffled_entrances(sub_builder.sectors, flexible_starts[name], entrance_list)
            filtered_entrance_list = [x for x in entrance_list if (x in entrances_map[name])]
            sub_builder.entrance_list = filtered_entrance_list