code: def grab_py_results(dirName, python_file, run_result):
      global g_direct_name_start
      global g_log_base_dir
      global g_py_runtime
      global g_py_iteration
  
      if not (g_direct_name_start in dirName):
          print("Cannot find your python log file.  Nothing is done.\n")
          return run_result
  
      logText = os.path.join(
          os.path.join(g_log_base_dir, dirName), python_file
      )
      with open(
          logText, "r"
      ) as thefile:  # go into tempfile and grab test run info
          for each_line in thefile:
              temp_string = each_line.split(":")
  
              if len(temp_string) > 0:
                  val = temp_string[-1].replace("\n", "")
  
              if g_py_runtime in each_line:  # found run time sequence
                  run_result["total time (ms)"].extend(eval(val))
  
              if g_py_iteration in each_line:
                  run_result["iteration number"].extend(eval(val))
      return run_result
  
file_path: h2o-3/scripts/grabGLRMJenkinRunResults.py
imports: import sys
  import os
  import json
label_desc: Use image node_id 6 for calling a global function with example usage: grab_py_results(dirName, python_file, run_result) and returns: run_result, run_result