code: def _if_spawn_run_and_exit():
      """If spawned process, run requested spawn task and exit. Else a no-op."""
  
      # `multiprocessing` module passes a script "from multiprocessing.x import y"
      # to subprocess, followed by a main function call. We use this to tell if
      # the process is spawned. Examples of x are "forkserver" or
      # "semaphore_tracker".
      is_spawned = "-c" in sys.argv[1:] and sys.argv[
          sys.argv.index("-c") + 1
      ].startswith("from multiprocessing.")
  
      if not is_spawned:
          return
      cmd = sys.argv[sys.argv.index("-c") + 1]
      # As a subprocess, we disregarding all other interpreter command line
      # arguments.
      sys.argv = sys.argv[0:1]
  
      # Run the specified command - this is expected to be one of:
      # 1. Spawn the process for semaphore tracker.
      # 2. Spawn the initial process for forkserver.
      # 3. Spawn any process as requested by the "spawn" method.
      exec(cmd)  # pylint: disable=exec-used
      sys.exit(0)
  
file_path: tensorflow-upstream/tensorflow/python/distribute/multi_process_lib.py
imports: import multiprocessing
  import os
  import platform
  import sys
  import unittest
  from absl import app
  from absl import logging
  from tensorflow.python.eager import test
label_desc: Use image node_id 4 for calling a global function with example usage: _if_spawn_run_and_exit() without return types