parameters: (func, iterable, processes, should_print_progress, *args, **kwargs)
return_statement: return result
docstring: A parallel map function that reports on its progress.
  
      Applies `func` to every item of `iterable` and return a list of the
      results. If `processes` is greater than one, a process pool is used to run
      the functions in parallel. `should_print_progress` is a boolean value that
      indicates whether a string 'N of M' should be printed to indicate how many
      of the functions have finished being run.
docstring_summary: A parallel map function that reports on its progress.
docstring_tokens: A parallel map function that reports on its progress .
function: def pmap(func, iterable, processes, should_print_progress, *args, **kwargs):
      """
      A parallel map function that reports on its progress.
  
      Applies `func` to every item of `iterable` and return a list of the
      results. If `processes` is greater than one, a process pool is used to run
      the functions in parallel. `should_print_progress` is a boolean value that
      indicates whether a string 'N of M' should be printed to indicate how many
      of the functions have finished being run.
      """
      global _current
      global _total
      _current = multiprocessing.Value('i', 0)
      _total = multiprocessing.Value('i', len(iterable))
  
      func_and_args = [(func, arg, should_print_progress,) for arg in iterable]
      if processes == 1:
          result = map(_wrapped_func, func_and_args, *args, **kwargs)
      else:
          pool = multiprocessing.Pool(initializer=_init,
                                      initargs=(_current, _total,),
                                      processes=processes)
          result = pool.map(_wrapped_func, func_and_args, *args, **kwargs)
          pool.close()
          pool.join()
  
      if should_print_progress:
          sys.stdout.write('\r')
      return result
function_tokens: def pmap ( func , iterable , processes , should_print_progress , * args , * * kwargs ) : global _current global _total _current = multiprocessing . Value ( 'i' , 0 ) _total = multiprocessing . Value ( 'i' , len ( iterable ) ) func_and_args = [ ( func , arg , should_print_progress , ) for arg in iterable ] if processes == 1 : result = map ( _wrapped_func , func_and_args , * args , * * kwargs ) else : pool = multiprocessing . Pool ( initializer = _init , initargs = ( _current , _total , ) , processes = processes ) result = pool . map ( _wrapped_func , func_and_args , * args , * * kwargs ) pool . close ( ) pool . join ( ) if should_print_progress : sys . stdout . write ( '\r' ) return result