code: def create(name, base, **kargs):
      """Creates a new class named *name* inheriting from *base* in the
      :mod:`~deap.creator` module. The new class can have attributes defined by
      the subsequent keyword arguments passed to the function create. If the
      argument is a class (without the parenthesis), the __init__ function is
      called in the initialization of an instance of the new object and the
      returned instance is added as an attribute of the class' instance.
      Otherwise, if the argument is not a class, (for example an :class:`int`),
      it is added as a "static" attribute of the class.
  
      :param name: The name of the class to create.
      :param base: A base class from which to inherit.
      :param attribute: One or more attributes to add on instantiation of this
                        class, optional.
  
      The following is used to create a class :class:`Foo` inheriting from the
      standard :class:`list` and having an attribute :attr:`bar` being an empty
      dictionary and a static attribute :attr:`spam` initialized to 1. ::
  
          create("Foo", list, bar=dict, spam=1)
  
      This above line is exactly the same as defining in the :mod:`creator`
      module something like the following. ::
  
          class Foo(list):
              spam = 1
  
              def __init__(self):
                  self.bar = dict()
  
      The :ref:`creating-types` tutorial gives more examples of the creator
      usage.
  
      .. warning::
  
         If your are inheriting from :class:`numpy.ndarray` see the
         :doc:`/tutorials/advanced/numpy` tutorial and the
         :doc:`/examples/ga_onemax_numpy` example.
  
      """
  
      if name in globals():
          warnings.warn(
              "A class named '{0}' has already been created and it "
              "will be overwritten. Consider deleting previous "
              "creation of that class or rename it.".format(name),
              RuntimeWarning,
          )
  
      # Check if the base class has to be replaced
      if base in class_replacers:
          base = class_replacers[base]
      meta_create(name, base, kargs)
  
file_path: deap/deap/creator.py
imports: import array
  import copy
  import copyreg
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: create(name, base) without return types