code: def test_logging(tmp_path):
      reporter = Reporter()
      key1 = uuid.uuid4().hex
      key2 = uuid.uuid4().hex
      stats_list = [
          {"aa": 0.3, "bb": 3.0},
          {"aa": 0.5, "bb": 3.0},
          {"aa": 0.2, "bb": 3.0},
      ]
      writer = SummaryWriter(tmp_path)
      for e in range(len(stats_list)):
          reporter.set_epoch(e + 1)
          with reporter.observe(key1) as sub:
              sub.register(stats_list[e])
              sub.next()
          with reporter.observe(key2) as sub:
              sub.register(stats_list[e])
              sub.next()
              logging.info(sub.log_message())
              logging.info(sub.log_message(-1))
              logging.info(sub.log_message(0, 1))
              sub.tensorboard_add_scalar(writer, -1)
          with pytest.raises(RuntimeError):
              logging.info(sub.log_message())
  
      logging.info(reporter.log_message())
  
      with reporter.observe(key1) as sub:
          sub.register({"aa": 0.1, "bb": 0.4})
          sub.next()
          sub.register({"aa": 0.1})
          sub.next()
  
imports: import logging
  import uuid
  from pathlib import Path
  import numpy
  import pytest
  import torch
  from torch.utils.tensorboard import SummaryWriter
  from espnet2.train.reporter import Average, ReportedValue, Reporter, aggregate
label_desc: Use image node_id 9 for calling a global function with example usage: test_logging(tmp_path) without return types