docs: def parallel_run(districts_list, n_of_processes, n_of_districts, run_id,
                   base_path=None):
      '''Organize parallel runs of ding0.
  
      The function take all districts in a list and divide them into
      n_of_processes parallel processes. For each process, the assigned districts
      are given to the function process_runs() with the argument n_of_districts
  
      Parameters
      ----------
      districts_list: list of int
          List with all districts to be run.
      n_of_processes: int
          Number of processes to run in parallel
      n_of_districts: int
          Number of districts to be run in each cluster given as argument to
          process_stats()
      run_id: str
          Identifier for a run of Ding0. For example it is used to create a
          subdirectory of os.path.join(`base_path`, 'results')
      base_path : str
          Base path for ding0 data (input, results and logs).
          Default is `None` which sets it to :code:`~/.ding0` (may deviate on
          windows systems).
          Specify your own but keep in mind that it a required a particular
          structure of subdirectories.
  
      See Also
      --------
      ding0_runs
  
      '''
  
      # define base path
      if base_path is None:
          base_path = BASEPATH
  
      if not os.path.exists(os.path.join(base_path, run_id)):
          os.makedirs(os.path.join(base_path, run_id))
  
      start = time.time()
      #######################################################################
      # Define an output queue
      output_info = mp.Queue()
      #######################################################################
      # Setup a list of processes that we want to run
      max_dist = len(districts_list)
      threat_long = floor(max_dist / n_of_processes)
  
      if threat_long == 0:
          threat_long = 1
  
      threats = [districts_list[x:x + threat_long] for x in range(0, len(districts_list), threat_long)]
  
      processes = []
      for th in threats:
          mv_districts = th
          processes.append(mp.Process(target=process_runs,
                                      args=(mv_districts, n_of_districts,
                                            output_info, run_id, base_path)))
      #######################################################################
      # Run processes
      for p in processes:
          p.start()
      # Resque output_info from processes
      output = [output_info.get() for p in processes]
      output = list(itertools.chain.from_iterable(output))
      # Exit the completed processes
      for p in processes:
          p.join()
  
      #######################################################################
      print('Elapsed time for', str(max_dist),
            'MV grid districts (seconds): {}'.format(time.time() - start))
  
      return output