code: def generate_run(self, logdir, run_name):
      subdir = os.path.join(logdir, run_name)
      with test_util.FileWriterCache.get(subdir) as writer:
          for step in range(self._STEPS):
              data = [1 + step, 2 + step, 3 + step]
              if run_name == self._RUN_WITH_LEGACY_SCALARS:
                  summ = tf.compat.v1.summary.scalar(
                      self._LEGACY_SCALAR_TAG,
                      tf.reduce_mean(data),
                  ).numpy()
              elif run_name == self._RUN_WITH_SCALARS:
                  summ = summary.op(
                      self._SCALAR_TAG,
                      tf.reduce_sum(data),
                      display_name=self._DISPLAY_NAME,
                      description=self._DESCRIPTION,
                  ).numpy()
              elif run_name == self._RUN_WITH_SCALARS_2:
                  summ = summary.op(
                      self._SCALAR_TAG,
                      2 * tf.reduce_sum(data),
                      display_name=self._DISPLAY_NAME,
                      description=self._DESCRIPTION,
                  ).numpy()
              elif run_name == self._RUN_WITH_SCALARS_3:
                  summ = summary.op(
                      self._SCALAR_TAG,
                      3 * tf.reduce_sum(data),
                      display_name=self._DISPLAY_NAME,
                      description=self._DESCRIPTION,
                  ).numpy()
              elif run_name == self._RUN_WITH_HISTOGRAM:
                  summ = tf.compat.v1.summary.histogram(
                      self._HISTOGRAM_TAG, data
                  ).numpy()
              else:
                  assert False, "Invalid run name: %r" % run_name
              writer.add_summary(summ, global_step=step)
  
imports: import csv
  import io
  import json
  import os.path
  import tensorflow
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard.backend import application
  from tensorboard.backend.event_processing import data_provider
  from tensorboard.backend.event_processing import plugin_event_multiplexer
  from tensorboard.backend.event_processing import tag_types
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.scalar import scalars_plugin
  from tensorboard.plugins.scalar import summary
  from tensorboard.util import test_util
label_desc: Use image node_id 3 for calling the ScalarsPluginTest obj's underlying member method code with example usage: obj.generate_run(logdir, run_name) without return types