code: def extract_test_results():
      """
      Extract error messages from jenkins console output and from java_*_0.out.txt if they exist to
      warn users of potentially bad tests.  In addition, it will grab the following info about the jenkins
      job from the console output and saved it into g_failed_test_info_dict:
      1.jobName
      2.build_id
      3.timestamp
      4.git_hash
      5.git_branch
      6.node_name
      7.build_failure
      8.build_timeout
      9.general_bad_java_messages
      failed_tests_info *********: list of failed tests and their associated bad java messages
      passed_tests_info *********: list of passed tests and their associated bad java messages
  
      This is achieved by calling various functions.
  
      :return: none
      """
      global g_test_root_dir
      global g_temp_filename
      global g_output_filename
      global g_build_func_list
  
      temp_func_list = copy.copy(g_build_func_list)
  
      if os.path.isfile(g_temp_filename):
          console_file = open(
              g_temp_filename, "r"
          )  # open temp file that stored jenkins job console output
  
          for (
              each_line
          ) in (
              console_file
          ):  # go through each line of console output to extract build ID, data/time ...
              each_line.strip()
  
              for each_function in temp_func_list:
                  to_continue = perform(
                      each_function, each_line, temp_func_list
                  )
  
                  if not (to_continue):
                      break
  
              if not (
                  to_continue
              ):  # something like build failure or built time out has occurred.  Stop
                  break
              else:
                  update_test_dict(
                      each_line
                  )  # update the test_dict with new tests if found
  
          console_file.close()
      else:
          print(
              "Error: console output file "
              + g_temp_filename
              + " does not exist."
          )
          sys.exit(1)
  
imports: import sys
  import os
  import json
  import pickle
  import copy
  import subprocess
label_desc: Use image node_id 11 for calling a global function with example usage: extract_test_results() without return types