code: def _check_extension_lambda(ext_base_name, fn, fn_desc, verbose):
      """
      Tries to load the extension in a new process.  If successful, puts fn(ext)
      to the queue or False otherwise.  Mutes all stdout/stderr.
      """
  
      def _target_fn(ext_base_name, fn, fn_desc, queue, verbose):
          import importlib
          import sys
          import traceback
  
          if verbose:
              print(
                  "Checking whether extension {ext_base_name} was {fn_desc}.".format(
                      ext_base_name=ext_base_name, fn_desc=fn_desc
                  )
              )
          else:
              # Suppress output
              sys.stdout = open(os.devnull, "w")
              sys.stderr = open(os.devnull, "w")
  
          try:
              ext = importlib.import_module(
                  "." + ext_base_name, "horovod"
              )
              result = fn(ext)
          except:
              traceback.print_exc()
              result = None
  
          if verbose:
              print(
                  "Extension {ext_base_name} {flag} {fn_desc}.".format(
                      ext_base_name=ext_base_name,
                      flag=("was" if result else "was NOT"),
                      fn_desc=fn_desc,
                  )
              )
  
          queue.put(result)
  
      # 'fork' is required because horovodrun is a frozen executable
      ctx = multiprocessing.get_context("fork")
      queue = ctx.Queue()
      p = ctx.Process(
          target=_target_fn,
          args=(ext_base_name, fn, fn_desc, queue, verbose),
      )
      p.daemon = True
      p.start()
      p.join()
      return queue.get_nowait()
  
imports: import json
  import multiprocessing
  import os
  import sys
  import sysconfig
  import warnings
  from contextlib import contextmanager
  from horovod.common.exceptions import get_version_mismatch_message, HorovodVersionMismatchError
label_desc: Use image node_id 4 for calling a global function with example usage: _check_extension_lambda(ext_base_name, fn, fn_desc, verbose) and returns: queue