code: def parallelCCompile(
      self,
      sources,
      output_dir=None,
      macros=None,
      include_dirs=None,
      debug=0,
      extra_preargs=None,
      extra_postargs=None,
      depends=None,
  ):
      # those lines are copied from distutils.ccompiler.CCompiler directly
      (
          macros,
          objects,
          extra_postargs,
          pp_opts,
          build,
      ) = self._setup_compile(
          output_dir,
          macros,
          include_dirs,
          sources,
          depends,
          extra_postargs,
      )
      cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
  
      # parallel code
      def _single_compile(obj):
          try:
              src, ext = build[obj]
          except KeyError:
              return
          self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  
      # convert to list, imap is evaluated on-demand
      thread_pool = multiprocessing.pool.ThreadPool(
          args[0].num_processes
      )
      list(thread_pool.imap(_single_compile, objects))
      return objects
  
file_path: NeMo/scripts/installers/setup_os2s_decoders.py
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import distutils.ccompiler
  import glob
  import multiprocessing.pool
  import os
  import platform
  import sys
  from setuptools import Extension, distutils, setup
label_desc: Use image node_id 1 for calling a global function with example usage: parallelCCompile(sources, output_dir, macros, include_dirs, debug, extra_preargs, extra_postargs, depends) and returns: objects