code: def make_factory(klass, **kwargs):
      
      factory_name = '%sFactory' % klass.__name__
  
      class Meta:
          model = klass
  
      kwargs['Meta'] = Meta
      base_class = kwargs.pop('FACTORY_CLASS', base.Factory)
  
      factory_class = type(base.Factory).__new__(type(base.Factory), factory_name, (base_class,), kwargs)
      factory_class.__name__ = '%sFactory' % klass.__name__
      factory_class.__doc__ = 'Auto-generated factory for class %s' % klass
      return factory_class
docs: Create a new, simple factory for the given class.