code: def parallel_for(loop_function, parameters, nb_threads=100):
      
      import multiprocessing.pool
      from contextlib import closing
      with closing(multiprocessing.pool.ThreadPool(nb_threads)) as pool:
          return pool.map(loop_function, parameters)
docs: Execute the loop body in parallel.
  
      .. note:: Race-Conditions
            Executing code in parallel can cause an error class called
            "race-condition".
  
      Parameters
      ----------
      loop_function : Python function which takes a tuple as input
      parameters : List of tuples
          Each element here should be executed in parallel.
  
      Returns
      -------
      return_values : list of return values