def find_containing_bags(bag: str, parsed_restrictions: list) -> set:
    """Find all the bags that can contain a given bag type

    :param bag: Type of bag to check
    :param parsed_restrictions: List of bag-containing restrictions
    :return: Set of bags that can contain the given bag type
    """
    containers = set()
    for parent, children in parsed_restrictions:
        for child in children:
            if bag == child[1]:
                containers = set.union(
                    find_containing_bags(parent, parsed_restrictions),
                    {parent}, containers)
    return containers