def find_all_that_contain_bag(bag_name, bag_dict):
    """
    Find all larger bags that can contain 'bag_name' where bag_dict
    maps bags -> all bags that can contain it
    """

    # basically breadth first search
    to_process = bag_dict.get(bag_name)
    found_bags = set()

    while len(to_process) > 0:

        curr_bag = to_process.pop()

        if curr_bag not in found_bags:
            found_bags.add(curr_bag)
            to_process |= set(bag_dict.get(curr_bag))

    return found_bags