code: def summary_command(
      parser, flags, log_to_file=True, log_to_summary=True
  ):
      """Cache the command used to reproduce experiment in summary folder."""
      if not flags.tensorboard:
          return
      exec_string = "python " + parser.prog + " \\\n"
      nflags = len(vars(flags))
      for i, arg in enumerate(vars(flags)):
          exec_string += "  --{} ".format(arg)
          exec_string += "{}".format(getattr(flags, arg))
          if i + 1 < nflags:
              exec_string += " \\\n"
      exec_string += "\n"
      if log_to_file:
          with tf.io.gfile.GFile(
              os.path.join(flags.logdir, "command.txt"), mode="w"
          ) as fid:
              fid.write(exec_string)
      if log_to_summary and flags.tensorboard:
          tf.summary.text("command", exec_string, step=0)
  
file_path: graphics/tensorflow_graphics/projects/pointnet/helpers.py
imports: from __future__ import print_function
  import argparse
  import os
  import tempfile
  import time
  import tensorflow
  import termcolor
label_desc: Use image node_id 3 for calling a global function with example usage: summary_command(parser, flags, log_to_file, log_to_summary) without return types