class_docstr: A toolbox for evolution that contains the evolutionary operators. At
  first the toolbox contains a :meth:`~deap.toolbox.clone` method that
  duplicates any element it is passed as argument, this method defaults to
  the :func:`copy.deepcopy` function. and a :meth:`~deap.toolbox.map`
  method that applies the function given as first argument to every items
  of the iterables given as next arguments, this method defaults to the
  :func:`map` function. You may populate the toolbox with any other
  function by using the :meth:`~deap.base.Toolbox.register` method.
  
  Concrete usages of the toolbox are shown for initialization in the
  :ref:`creating-types` tutorial and for tools container in the
  :ref:`next-step` tutorial.
docstr: Register a *function* in the toolbox under the name *alias*. You
  may provide default arguments that will be passed automatically when
  calling the registered function. Fixed arguments can then be overridden
  at function call time.
  
  :param alias: The name the operator will take in the toolbox. If the
                alias already exist it will overwrite the operator
                already present.
  :param function: The function to which refer the alias.
  :param argument: One or more argument (and keyword argument) to pass
                   automatically to the registered function when called,
                   optional.
  
  The following code block is an example of how the toolbox is used. ::
  
      >>> def func(a, b, c=3):
      ...     print a, b, c
      ...
      >>> tools = Toolbox()
      >>> tools.register("myFunc", func, 2, c=4)
      >>> tools.myFunc(3)
      2 3 4
  
  The registered function will be given the attributes :attr:`__name__`
  set to the alias and :attr:`__doc__` set to the original function's
  documentation. The :attr:`__dict__` attribute will also be updated
  with the original function's instance dictionary, if any.
docstr_tok: ["Register","a","*","function","*","in","the","toolbox","under","the","name","*","alias","*",".","You","may","provide","default","arguments","that","will","be","passed","automatically","when","calling","the","registered","function",".","Fixed","arguments","can","then","be","overridden","at","function","call","time",".",":","param","alias",":","The","name","the","operator","will","take","in","the","toolbox",".","If","the","alias","already","exist","it","will","overwrite","the","operator","already","present",".",":","param","function",":","The","function","to","which","refer","the","alias",".",":","param","argument",":","One","or","more","argument","(","and","keyword","argument",")","to","pass","automatically","to","the","registered","function","when","called",",","optional",".","The","following","code","block","is","an","example","of","how","the","toolbox","is","used",".",":",":",">",">",">","def","func","(","a",",","b",",","c=3",")",":","...","print","a",",","b",",","c","...",">",">",">","tools","=","Toolbox","(",")",">",">",">","tools.register","(","``","myFunc","''",",","func",",","2",",","c=4",")",">",">",">","tools.myFunc","(","3",")","2","3","4","The","registered","function","will","be","given","the","attributes",":","attr",":","`","__name__","`","set","to","the","alias","and",":","attr",":","`","__doc__","`","set","to","the","original","function's","documentation",".","The",":","attr",":","`","__dict__","`","attribute","will","also","be","updated","with","the","original","function","'s","instance","dictionary",",","if","any","."]
code: def register(self, alias, function, *args, **kargs):
      """Register a *function* in the toolbox under the name *alias*. You
      may provide default arguments that will be passed automatically when
      calling the registered function. Fixed arguments can then be overridden
      at function call time.
  
      :param alias: The name the operator will take in the toolbox. If the
                    alias already exist it will overwrite the operator
                    already present.
      :param function: The function to which refer the alias.
      :param argument: One or more argument (and keyword argument) to pass
                       automatically to the registered function when called,
                       optional.
  
      The following code block is an example of how the toolbox is used. ::
  
          >>> def func(a, b, c=3):
          ...     print a, b, c
          ...
          >>> tools = Toolbox()
          >>> tools.register("myFunc", func, 2, c=4)
          >>> tools.myFunc(3)
          2 3 4
  
      The registered function will be given the attributes :attr:`__name__`
      set to the alias and :attr:`__doc__` set to the original function's
      documentation. The :attr:`__dict__` attribute will also be updated
      with the original function's instance dictionary, if any.
      """
      pfunc = partial(function, *args, **kargs)
      pfunc.__name__ = alias
      pfunc.__doc__ = function.__doc__
  
      if hasattr(function, "__dict__") and not isinstance(
          function, type
      ):
          # Some functions don't have a dictionary, in these cases
          # simply don't copy it. Moreover, if the function is actually
          # a class, we do not want to copy the dictionary.
          pfunc.__dict__.update(function.__dict__.copy())
  
      setattr(self, alias, pfunc)
  
imports: import sys
  from copy import deepcopy
  from functools import partial
  from operator import mul, truediv
label_desc: Use image node_id 2 for calling the Toolbox obj's underlying member method code with example usage: obj.register(alias, function) without return types