# TIP: Use `itertools.combinations` to get all possible combinations.
# See https://docs.python.org/3/library/itertools.html#itertools.combinations.
import itertools

# TIP: Use a defaultdict to simplify the code (no need to check if a key
# exists before appending to the list).
from collections import defaultdict

def organize_products_by_all_feature_combinations(
        product_data: dict[str, set]
    ) -> dict[frozenset, list[str]]:
    """
    Organize products based on all possible combinations of their features
    from a dictionary.

    Parameters
    ----------
    product_data : dict[str, set]
        A dictionary where each key is a product name and its value
        is a set of features. Note: The keys of dictionaries must be immutable.
        Therefore, `frozenset` is used instead of `set`.
        See: https://docs.python.org/3/library/stdtypes.html#frozenset.

    Returns
    -------
    dict[frozenset, list[str]]
        A dictionary where keys are frozensets of feature combinations
        and values are lists of product names.

    Examples
    --------
    >>> product_data = {
    ...    "Product 1": {"Eco-Friendly", "Durable"},
    ...    "Product 2": {"Eco-Friendly", "Compact"},
    ...    "Product 3": {"Durable", "Compact"}
    ... }
    >>> organize_products_by_all_feature_combinations(product_data)
    {
        frozenset({'Eco-Friendly'}): ['Product 1', 'Product 2'],
        frozenset({'Durable'}): ['Product 1', 'Product 3'],
        frozenset({'Compact'}): ['Product 2', 'Product 3'],
        frozenset({'Eco-Friendly', 'Durable'}): ['Product 1'],
        frozenset({'Eco-Friendly', 'Compact'}): ['Product 2'],
        frozenset({'Durable', 'Compact'}): ['Product 3']
    }
    """
    raise NotImplementedError("Complete this function.")
