code: def __init__(self, key: str, logging_key: Optional[str]):
      super().__init__(observing_keys=[key])
      self.key = key
      self.logging_key = logging_key or key
  
imports: import logging
  from typing import Any, Dict, Iterable, List, Optional
  from reagent.core.tensorboardX import SummaryWriterContext
  from reagent.core.tracker import Aggregator, Observer
label_desc: Use image node_id 1 to create a new TensorBoardScalarObserver object from inherited base classes: Observer with example: obj = TensorBoardScalarObserver(key, logging_key)