code: def _maybe_write_metric(
      self, metric_key: str, metric_val: Any, step: int
  ) -> None:
      # For now, we only log scalar metrics.
      if not util.is_numerical_scalar(metric_val):
          return
  
      self.writer.add_scalar(
          "Determined/" + metric_key, metric_val, step
      )
  
file_path: determined/harness/determined/tensorboard/metric_writers/callback.py
imports: import abc
  import logging
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
  from determined import util
label_desc: Use image node_id 2 for calling the BatchMetricWriter obj's underlying member method code with example usage: obj._maybe_write_metric(metric_key, metric_val, step) without return types