code: def WriteScalarSeries(writer, tag, f, n=5):
      """Write a series of scalar events to writer, using f to create values."""
      step = 0
      wall_time = _start_time
      for i in range(n):
          v = f(i)
          value = tf.Summary.Value(tag=tag, simple_value=v)
          summary = tf.Summary(value=[value])
          event = tf.Event(
              wall_time=wall_time, step=step, summary=summary
          )
          writer.add_event(event)
          step += 1
          wall_time += 10
  
file_path: tensorboard/tensorboard/scripts/generate_testdata.py
imports: import bisect
  import math
  import os
  import os.path
  import random
  import shutil
  from absl import app
  from absl import flags
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: WriteScalarSeries(writer, tag, f, n) without return types