code: def write_txt_summary(training_summary, summary_dir):
      """Writes a summary text file to record stats."""
      summary_path = os.path.join(summary_dir, _SUMMARY_TXT)
      with tf.io.gfile.GFile(summary_path, "wb") as f:
          logging.info("Training Summary: \n%s", str(training_summary))
          f.write(json.dumps(training_summary, indent=4))
  
file_path: autodist/examples/benchmark/utils/bert_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  import sys
  import tensorflow
  import time
  from absl import logging
label_desc: Use image node_id 4 for calling a global function with example usage: write_txt_summary(training_summary, summary_dir) without return types