code: def add_histogram_summary(self, x, tag=None):
      
      if not self.summary_collections:
        return
      with self.g.as_default():
        tag = tag or _tag_for(x.name)
        summary = tf.summary.histogram(
            tag, x, collections=self.summary_collections)
        return summary
docs: Add a summary operation to visualize the histogram of x's values.