def with_spellcasting_factory(self, spellcasting_factory=None):
        if not spellcasting_factory:
            self.use_real_spellcasting_factory = True
        else:
            if hasattr(spellcasting_factory, 'build'):
                self.factories.append(spellcasting_factory.build())
            else:
                self.factories.append(spellcasting_factory)
        return self
Configure action factory to use real magic factory
dataset/ETHPy150Open tuturto/pyherc/src/pyherc/test/builders/action.py/ActionFactoryBuilder.with_spellcasting_factory