code: def test_writer(self):
      with SummaryWriter() as writer:
          sample_rate = 44100
  
          n_iter = 0
          writer.add_scalar("data/scalar_systemtime", 0.1, n_iter)
          writer.add_scalar(
              "data/scalar_customtime", 0.2, n_iter, walltime=n_iter
          )
          writer.add_scalars(
              "data/scalar_group",
              {
                  "xsinx": n_iter * np.sin(n_iter),
                  "xcosx": n_iter * np.cos(n_iter),
                  "arctanx": np.arctan(n_iter),
              },
              n_iter,
          )
          x = np.zeros((32, 3, 64, 64))  # output from network
          writer.add_images("Image", x, n_iter)  # Tensor
          writer.add_image_with_boxes(
              "imagebox",
              np.zeros((3, 64, 64)),
              np.array([[10, 10, 40, 40], [40, 40, 60, 60]]),
              n_iter,
          )
          x = np.zeros(sample_rate * 2)
  
          writer.add_audio("myAudio", x, n_iter)
          writer.add_video(
              "myVideo",
              np.random.rand(16, 48, 1, 28, 28).astype(np.float32),
              n_iter,
          )
          writer.add_text(
              "Text", "text logged at step:" + str(n_iter), n_iter
          )
          writer.add_text("markdown Text", """a|b\n-|-\nc|d""", n_iter)
          writer.add_histogram("hist", np.random.rand(100, 100), n_iter)
          writer.add_pr_curve(
              "xoxo",
              np.random.randint(2, size=100),
              np.random.rand(100),
              n_iter,
          )  # needs tensorboard 0.4RC or later
          writer.add_pr_curve_raw(
              "prcurve with raw data",
              true_positive_counts,
              false_positive_counts,
              true_negative_counts,
              false_negative_counts,
              precision,
              recall,
              n_iter,
          )
          # export scalar data to JSON for external processing
          writer.export_scalars_to_json("./all_scalars.json")
          os.remove("./all_scalars.json")
          imgs = []
          for i in range(5):
              imgs.append(np.ones((3, 100, 110)))
          with SummaryWriter() as w:
              w.add_images("img_list", imgs, dataformats="CHW")
  
file_path: pytorch-tensorboardx/tests/test_writer.py
imports: from tensorboardX import SummaryWriter
  from tensorboard.compat.tensorflow_stub.pywrap_tensorflow import PyRecordReader_New
  from tensorboardX.proto import event_pb2
  import os
  import numpy
  import pytest
  import unittest
  import time
label_desc: Use image node_id 7 for calling the WriterTest obj's underlying member method code with example usage: obj.test_writer() without return types