code: def background_command_waiter(
      command, popen_object, require_zero_status
  ):
      """This is the function that is called from background_command, in
      a separate thread."""
  
      popen_object.communicate()
      if popen_object.returncode is not 0:
          str = "Command exited with status {0}: {1}".format(
              popen_object.returncode, command
          )
          if require_zero_status:
              logger.error(str)
              # thread.interrupt_main() sends a KeyboardInterrupt to the main
              # thread, which will generally terminate the program.
              thread_module.interrupt_main()
          else:
              logger.warning(str)
  
imports: from __future__ import print_function
  from __future__ import division
  import argparse
  import logging
  import math
  import os
  import subprocess
  import sys
  import threading
label_desc: Use image node_id 8 for calling a global function with example usage: background_command_waiter(command, popen_object, require_zero_status) without return types