code: def main(unused_argv):
      logdir = FLAGS.logdir
      logging.info("Saving output to %s.", logdir)
      for i_run in range(0, FLAGS.num_runs):
          run_name = "test-run-name-%.8d" % i_run
          writer = tf.summary.create_file_writer(
              os.path.join(logdir, run_name)
          )
          with writer.as_default():
              for i_tag in range(0, FLAGS.num_tags_per_run):
                  tag_name = "cool tag %.8d" % i_tag
                  for i_scalar in range(0, FLAGS.num_scalars_per_tag):
                      tf.summary.scalar(
                          tag_name, random.random(), step=i_scalar
                      )
      logging.info(
          "Created %d runs, each with %d tags, and %d scalar values in each tag"
          % (
              FLAGS.num_runs,
              FLAGS.num_tags_per_run,
              FLAGS.num_scalars_per_tag,
          )
      )
      logging.info("Output saved to %s." % logdir)
      logging.info(
          """
  You can now view the scalars in this logdir:
  
  Run local:
  
      tensorboard --logdir=%s
  
  Upload to TensorBoard.dev:
  
      tensorboard dev upload \\
        --logdir=%s \\
        --name=\"Scalars demo.\" \\
        --one_shot
  """,
          logdir,
          logdir,
      )
  
imports: import os
  import random
  from absl import app
  from absl import flags
  from absl import logging
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: main(unused_argv) without return types