code: def scalar(self, tag, value, step=None):
      
      value = float(onp.array(value))
      if step is None:
        step = self._step
      else:
        self._step = step
      summary = Summary(value=[Summary.Value(tag=tag, simple_value=value)])
      self.add_summary(summary, step)
docs: Saves scalar value.
  
      Args:
        tag: str: label for this data
        value: int/float: number to log
        step: int: training step