code: def process_test_logs(
      name,
      test_name,
      test_args,
      benchmark_type,
      start_time,
      run_time,
      log_files,
  ):
      """Gather test information and put it in a TestResults proto.
  
      Args:
        name: Benchmark target identifier.
        test_name: A unique bazel target, e.g. "//path/to:test"
        test_args: A string containing all arguments to run the target with.
        benchmark_type: A string representing the BenchmarkType enum; the
          benchmark type for this target.
        start_time: Test starting time (epoch)
        run_time:   Wall time that the test ran for
        log_files:  Paths to the log files
  
      Returns:
        A TestResults proto
      """
  
      results = test_log_pb2.TestResults()
      results.name = name
      results.target = test_name
      results.start_time = start_time
      results.run_time = run_time
      results.benchmark_type = (
          test_log_pb2.TestResults.BenchmarkType.Value(
              benchmark_type.upper()
          )
      )
  
      # Gather source code information
      git_sha = get_git_commit_sha()
      if git_sha:
          results.commit_id.hash = git_sha
  
      results.entries.CopyFrom(process_benchmarks(log_files))
      results.run_configuration.argument.extend(test_args)
      results.machine_configuration.CopyFrom(
          system_info_lib.gather_machine_configuration()
      )
      return results
  
file_path: tensorflow-upstream/tensorflow/tools/test/run_and_gather_logs_lib.py
imports: import os
  import re
  import shlex
  import subprocess
  import tempfile
  import time
  from tensorflow.core.util import test_log_pb2
  from tensorflow.python.platform import gfile
  from tensorflow.tools.test import gpu_info_lib
  from tensorflow.tools.test import system_info_lib
label_desc: Use image node_id 2 for calling a global function with example usage: process_test_logs(name, test_name, test_args, benchmark_type, start_time, run_time, log_files) and returns: results