def _flatten(d: dict) -> list:
    """Transform dict of sets in flat list

    :param d: dict of sets
    :return: list of tuples
    """
    return [(key, v) for key, values in d.items() for v in values]