def create(self, **kwargs):
        """Create and track a new instance of the factory's type."""
        fullkwargs = self.defaults.copy()
        fullkwargs.update(kwargs)
        obj = self.type(**fullkwargs)
        self.objects.add(obj)
Create and track a new instance of the factory's type.
recipes/Python/578165_A_generic_factory_factory/recipe-578165.py