class_docstr: Mapper that leverages python's multiprocessing.
      
docstr: NOTE: if number of nodes is not given, will autodetect processors.
  
  NOTE: additional keyword input is optional, with:
      id          - identifier for the pool
      initializer - function that takes no input, called when node is spawned
      initargs    - tuple of args for initializers that have args
      maxtasksperchild - int that limits the max number of tasks per node
          
docstr_tok: ["NOTE",":","if","number","of","nodes","is","not","given",",","will","autodetect","processors",".","NOTE",":","additional","keyword","input","is","optional",",","with",":","id","-","identifier","for","the","pool","initializer","-","function","that","takes","no","input",",","called","when","node","is","spawned","initargs","-","tuple","of","args","for","initializers","that","have","args","maxtasksperchild","-","int","that","limits","the","max","number","of","tasks","per","node"]
code: def __init__(self, *args, **kwds):
      """\nNOTE: if number of nodes is not given, will autodetect processors.
      \nNOTE: additional keyword input is optional, with:
          id          - identifier for the pool
          initializer - function that takes no input, called when node is spawned
          initargs    - tuple of args for initializers that have args
          maxtasksperchild - int that limits the max number of tasks per node
      """
      hasnodes = "nodes" in kwds
      arglen = len(args)
      if "ncpus" in kwds and (hasnodes or arglen):
          msg = "got multiple values for keyword argument 'ncpus'"
          raise TypeError(msg)
      elif hasnodes:  # XXX: multiple try/except is faster?
          if arglen:
              msg = "got multiple values for keyword argument 'nodes'"
              raise TypeError(msg)
          kwds["ncpus"] = kwds.pop("nodes")
      elif arglen:
          kwds["ncpus"] = args[0]
      if "processes" in kwds:
          if "ncpus" in kwds:
              msg = (
                  "got multiple values for keyword argument 'processes'"
              )
              raise TypeError(msg)
          kwds["ncpus"] = kwds.pop("processes")
      self.__nodes = kwds.pop("ncpus", cpu_count())
  
      # Create an identifier for the pool
      self._id = kwds.pop("id", None)  #'pool'
      if self._id is None:
          self._id = self.__nodes
  
      self._kwds = kwds
  
      # Create a new server if one isn't already initialized
      self._serve()
      return
  
imports: from pathos.abstract_launcher import AbstractWorkerPool
  from pathos.helpers.mp_helper import starargs
  from pathos.helpers import cpu_count, freeze_support, ProcessPool
  import warnings
  import sys
  from pathos.helpers import ThreadPool
  from pathos.threading import ThreadPool
label_desc: Use image node_id 1 to create a new ProcessPool object from inherited base classes: AbstractWorkerPool with example: obj = ProcessPool()