code: def associate_test_with_java(
      testname, java_message, java_message_type
  ):
      """
      When a new unit test is started as indicated in the java_*_0.out.txt file,
      update the data structures that are keeping track of unit tests being run and
      bad java messages/messages types associated with each unit test.  Since a new
      unit test is being started, save all the bad java messages associated with
      the previous unit test and start a new set for the new unit test.
  
      Parameters
      ----------
      testname :  str
          previous unit test testname
      java_message :  list of str
          bad java messages associated with testname
      java_message_type :  list of str
          bad java message types associated with testname
  
      :return :  none
      """
      global g_failed_jobs  # record job names of failed jobs
      global g_failed_job_java_messages  # record failed job java message
      global g_failed_job_java_message_types
  
      global g_success_jobs  # record job names of passed jobs
      global g_success_job_java_messages  # record of successful jobs bad java messages
      global g_success_job_java_message_types
  
      if len(java_message) > 0:
          if testname in g_failed_jobs:
              message_index = g_failed_jobs.index(testname)
              g_failed_job_java_messages[message_index] = java_message
              g_failed_job_java_message_types[
                  message_index
              ] = java_message_type
          else:  # job has been sucessfully executed but something still has gone wrong
              g_success_jobs.append(testname)
              g_success_job_java_messages.append(java_message)
              g_success_job_java_message_types.append(java_message_type)
  
imports: import sys
  import os
  import json
  import pickle
  import copy
  import subprocess
label_desc: Use image node_id 16 for calling a global function with example usage: associate_test_with_java(testname, java_message, java_message_type) without return types