code: def summarize_collection(
      collection, name_filter=None, summarizer=summarize_tensor
  ):
      """Summarize a graph collection of tensors, possibly filtered by name."""
      tensors = []
      for op in ops.get_collection(collection):
          if name_filter is None or re.match(name_filter, op.op.name):
              tensors.append(op)
      return summarize_tensors(tensors, summarizer)
  
file_path: tensornets/tensornets/contrib_layers/summaries.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import standard_ops
  from tensorflow.python.summary import summary
label_desc: Use image node_id 6 for calling a global function with example usage: summarize_collection(collection, name_filter, summarizer) and returns: summarize_tensors