code: def store_metrics(
      tb_logger,
      metrics: Dict[
          str,
          Union[
              float, torch.Tensor, Dict[str, Union[float, torch.Tensor]]
          ],
      ],
      step: Optional[int] = None,
  ) -> None:
      for plot_name, plot_value_or_dict in metrics.items():
          if isinstance(plot_value_or_dict, dict):
              if plot_name not in tb_logger.line_plot_buffer:
                  tb_logger.line_plot_buffer[plot_name] = {}
              for line_name, plot_value in plot_value_or_dict.items():
                  LocalCacheLogger._add_point(
                      tb_logger, plot_name, line_name, plot_value, step
                  )
          else:
              LocalCacheLogger._add_point(
                  tb_logger, plot_name, "", plot_value_or_dict, step
              )
  
file_path: ReAgent/reagent/core/oss_tensorboard_logger.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  from pytorch_lightning.loggers import TensorBoardLogger
  from pytorch_lightning.utilities import rank_zero_only
label_desc: Use image node_id 1 for calling the LocalCacheLogger obj's underlying member method code with example usage: obj.store_metrics(tb_logger, metrics, step) without return types