from typing import Set
from typing import List


def _is_closed(itemset: Set, same_sup_itemsets: List[Set]) -> bool:
    """Verifies if a given itemset is a closed frequent itemset.

    Note:
        This function is not supposed to be used externally.

    Args:
        itemset (Set): The itemset to test for closed frequent itemset.
        same_sup_itemsets (List[Set]): A list of itemset with same
            support.

    Returns:
        bool: True if `itemset` is a closed frequent itemset.
    """
    check = [itemset.issubset(x) for x in same_sup_itemsets if x != itemset]
    return not bool(check.count(True))