def cells(): for dom in DOMAINS: yield dom, frozenset() for f in FEATURES: yield dom, frozenset([f]) yield dom, frozenset(FEATURES)