@classmethod
    def generate(cls, name, *elements, **kwargs):
        by_category = defaultdict(list)
        for element in elements:
            by_category[element.category].append(element)

        new = cls.objects.create(name=name, **kwargs)

        for element_list in itertools.product(*by_category.values()):
            e = Environment.objects.create(profile=new)
            e.elements.add(*element_list)

        return new
break_on_false is defaulted to True because the majority of situations in which this
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/environments/models.py/Profile.generate--crossover with--dataset/ETHPy150Open flags/Reactor-3/life.py/execute_raw