class_docstr: Summary plugin base class.
  
  Summary plugins log additional summary values (e.g. GPU usage,
  etc.) per logged summary. This class is used to patch the TF env
  to handle `add_summary` of `tensorflow.summary.FileWriter` and of
  `tensorboardX.writer.SummaryToEventTransformer`.
class_docstr_tok: ["Summary","plugin","base","class",".","Summary","plugins","log","additional","summary","values","(","e.g",".","GPU","usage",",","etc",".",")","per","logged","summary",".","This","class","is","used","to","patch","the","TF","env","to","handle","`","add_summary","`","of","`","tensorflow.summary.FileWriter","`","and","of","`","tensorboardX.writer.SummaryToEventTransformer","`","."]
docstr: Callback to apply summary values via scalars API.
  
  This is the TF 2.x and tensorboardX API for logging scalars.
docstr_tok: ["Callback","to","apply","summary","values","via","scalars","API",".","This","is","the","TF","2.x","and","tensorboardX","API","for","logging","scalars","."]
code: def _handle_tf_scalar(
      self, wrapped_scalar_f, name, data, step=None, description=None
  ):
      """Callback to apply summary values via scalars API.
  
      This is the TF 2.x and tensorboardX API for logging scalars.
      """
      # pylint: disable=unused-argument
      vals = self._summary_values(step)
      if vals:
          self.log.debug("summary values via scalar: %s", vals)
          for tag, val in vals.items():
              if val is not None:
                  wrapped_scalar_f(tag, val, step)
  
imports: import time
  import warnings
  from guild import python_util
  from guild import util
  from guild.plugin import Plugin
label_desc: Use image node_id 17 for calling the SummaryPlugin obj's underlying member method code with example usage: obj._handle_tf_scalar(wrapped_scalar_f, name, data, step, description) without return types