code: def _create_python_object_snapshot():
      gc.collect()
      all_objects = gc.get_objects()
      result = collections.defaultdict(set)
      for obj in all_objects:
          result[_get_typename(obj)].add(id(obj))
      return result
  
file_path: tensorflow-upstream/tensorflow/python/framework/python_memory_checker.py
imports: import collections
  import copy
  import gc
  from tensorflow.python.framework import _python_memory_checker_helper
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.profiler import trace
label_desc: Use image node_id 2 for calling a global function with example usage: _create_python_object_snapshot() and returns: result