code: def save_failed_tests_info():
      """
      Given the failed tests information in g_failed_testnames, add the new failed test to
      text file.  In addition, it will update the dictionary that stores all failed test info as well.
  
      :return: None
      """
      global g_failed_tests_info_dict
      if len(g_failed_testnames) > 0:  # found failed test
          if (
              os.path.isfile(g_failed_tests_dict)
              and os.path.getsize(g_failed_tests_dict) > 10
          ):
              try:
                  g_failed_tests_info_dict = json.load(
                      open(g_failed_tests_dict, "r")
                  )
              except:
                  init_failed_tests_dict()
  
              # with open(g_failed_tests_dict, 'rb') as dict_file:
              #     g_failed_tests_info_dict = pickle.load(dict_file)
          else:  # file not found, create new dict
              init_failed_tests_dict()
  
          with open(g_summary_text_filename, "a") as failed_file:
              with open(g_daily_failure_csv, "w") as daily_failure:
                  for index in range(len(g_failed_testnames)):
                      testInfo = ",".join(
                          [
                              g_timestring,
                              g_job_name,
                              str(g_build_id),
                              g_git_hash,
                              g_node_name,
                              g_unit_test_type,
                              g_failed_testnames[index],
                          ]
                      )
                      failed_file.write(testInfo + "\n")
                      daily_failure.write(testInfo + "\n")
                      # update failed tests dictionary
                      update_failed_test_info_dict(
                          g_failed_testnames[index],
                          g_failed_test_paths[index],
                      )
          json.dump(
              g_failed_tests_info_dict, open(g_failed_tests_dict, "w")
          )
  
file_path: h2o-3/scripts/scrapeForIntermittents.py
imports: import sys
  import os
  import json
  import subprocess
  import time
  import datetime
  from pytz import timezone
  from dateutil import parser
label_desc: Use image node_id 6 for calling a global function with example usage: save_failed_tests_info() without return types