code: def summarize(value, type, name, summary_collection="tflearn_summ"):
      """summarize.
  
      A custom summarization op.
  
      Arguemnts:
          value: `Tensor`. The tensor value to monitor.
          type: `str` among 'histogram', 'scalar'. The data monitoring type.
          name: `str`. A name for this summary.
          summary_collection: A collection to add this summary to and
              also used for returning a merged summary over all its elements.
              Default: 'tflearn_summ'.
  
      Returns:
          `Tensor`. Merge of all summary in 'summary_collection'.
  
      """
      if tf012:
          name = name.replace(":", "_")
      summaries.get_summary(type, name, value, summary_collection)
      return merge_summary(tf.get_collection(summary_collection))
  
file_path: tflearn/tflearn/helpers/summarizer.py
imports: from __future__ import division, print_function, absolute_import
  import tensorflow.compat.v1
  from ..None import summaries
label_desc: Use image node_id 5 for calling a global function with example usage: summarize(value, type, name, summary_collection) and returns: merge_summary