class_docstr: Parallelisation wrapper for working with map-like callables, such as
  `multiprocessing.Pool.map`.
  
  Parameters
  ----------
  pool : int or map-like callable
      If `pool` is an integer, then it specifies the number of threads to
      use for parallelization. If ``int(pool) == 1``, then no parallel
      processing is used and the map builtin is used.
      If ``pool == -1``, then the pool will utilize all available CPUs.
      If `pool` is a map-like callable that follows the same
      calling sequence as the built-in map function, then this callable is
      used for parallelization.
class_docstr_tok: ["Parallelisation","wrapper","for","working","with","map-like","callables",",","such","as","`","multiprocessing.Pool.map","`",".","Parameters","--","--","--","--","--","pool",":","int","or","map-like","callable","If","`","pool","`","is","an","integer",",","then","it","specifies","the","number","of","threads","to","use","for","parallelization",".","If","``","int","(","pool",")","==","1","``",",","then","no","parallel","processing","is","used","and","the","map","builtin","is","used",".","If","``","pool","==","-1","``",",","then","the","pool","will","utilize","all","available","CPUs",".","If","`","pool","`","is","a","map-like","callable","that","follows","the","same","calling","sequence","as","the","built-in","map","function",",","then","this","callable","is","used","for","parallelization","."]
code: def __call__(self, func, iterable):
      # only accept one iterable because that's all Pool.map accepts
      try:
          return self._mapfunc(func, iterable)
      except TypeError as e:
          # wrong number of arguments
          raise TypeError(
              "The map-like callable must be of the"
              " form f(func, iterable)"
          ) from e
  
imports: import re
  from contextlib import contextmanager
  import functools
  import operator
  import warnings
  import numbers
  from collections import namedtuple
  import inspect
  import math
  from typing import Optional, Union, TYPE_CHECKING, TypeVar
  import numpy
  from scipy._lib._array_api import array_namespace
label_desc: Use image node_id 7 for calling the MapWrapper obj's underlying member method code with example usage: obj.__call__(func, iterable) and returns: self