class_docstr: Logs to a tf.summary created in a given logdir.
  
  If multiple TFSummaryLogger are created with the same logdir, results will be
  categorized by labels.
class_docstr_tok: ["Logs","to","a","tf.summary","created","in","a","given","logdir",".","If","multiple","TFSummaryLogger","are","created","with","the","same","logdir",",","results","will","be","categorized","by","labels","."]
code: def write(self, values: base.LoggingData):
      if self._steps_key is not None and self._steps_key not in values:
          logging.warning(
              "steps key %s not found. Skip logging.", self._steps_key
          )
          return
  
      step = (
          values[self._steps_key]
          if self._steps_key is not None
          else self._iter
      )
  
      with self.summary.as_default():
          # TODO(b/159065169): Remove this suppression once the bug is resolved.
          # pytype: disable=unsupported-operands
          for key in values.keys() - [self._steps_key]:
              # pytype: enable=unsupported-operands
              tf.summary.scalar(
                  f"{self.label}/{_format_key(key)}",
                  data=values[key],
                  step=step,
              )
      self._iter += 1
  
file_path: acme/acme/utils/loggers/tf_summary.py
imports: import time
  from typing import Optional
  from absl import logging
  from acme.utils.loggers import base
  import tensorflow
label_desc: Use image node_id 2 for calling the TFSummaryLogger obj's underlying member method code with example usage: obj.write(values) without return types