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 from summary_ops_v2.
docstr_tok: ["Callback","to","apply","summary","values","from","summary_ops_v2","."]
code: def _handle_scalar_ops_v2(
      self, wrapped_scalar_f, name, tensor, family=None, step=None
  ):
      """Callback to apply summary values from summary_ops_v2."""
      # 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=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 18 for calling the SummaryPlugin obj's underlying member method code with example usage: obj._handle_scalar_ops_v2(wrapped_scalar_f, name, tensor, family, step) without return types