def generate(self, element_amount):
        instance = deepcopy(self)
        instance.set_element_amount(element_amount)
        return instance
This method returns a Factory that can be iterated.
dataset/ETHPy150Open arieb/python-testdata/testdata/base.py/Factory.generate