code: def run_parallel(func, kwargs, n_procs):
      """
      Utility to Run a number of parallel processes.
  
      :param  args: the arges to be passed to subprocess
      :param num_processes: number of processes to run.
      """
      import cloudpickle
      from tempfile import TemporaryDirectory
  
      log.info("-" * 100)
      log.info(f"Starting {n_procs} parallel processes")
      log.info("-" * 100)
  
      with TemporaryDirectory() as temp_dir:
          with open(
              os.path.join(temp_dir, "search_kwargs.json"), "w"
          ) as f:
              json.dump(kwargs, f)
          with open(
              os.path.join(temp_dir, "search_func.pkl"), "wb"
          ) as f:
              cloudpickle.dump(func, f)
  
          processes = _run_subprocess(temp_dir, n_procs)
  
          for _, process in enumerate(processes):
              process.wait()
  
imports: import os
  import subprocess
  import sys
  import copy
  import json
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: run_parallel(func, kwargs, n_procs) without return types