code: def _log(self, tag, value):
      self.logger.log(tag, value)
      if self.summary_writer is not None:
          summary = tf.compat.v1.Summary(
              value=[
                  tf.compat.v1.Summary.Value(
                      tag=tag, simple_value=value
                  )
              ]
          )
          self.summary_writer.add_summary(summary, self.step)
  
imports: import itertools
  import numpy
  import tensorflow
  from tensorflow_estimator.python.estimator.export.export import build_supervised_input_receiver_fn_from_input_fn
label_desc: Use image node_id 6 for calling the _TrainLogHook obj's underlying member method code with example usage: obj._log(tag, value) without return types