def exactly_n(l, n=1):
    i = iter(l)
    return all(any(i) for j in range(n)) and not any(i)
Exercises prov.model without the actual serialization and PROV-N
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/exactly_n--crossover with--dataset/ETHPy150Open trungdong/prov/prov/tests/test_model.py/RoundTripModelTest.assertRoundTripEquivalence