class_docstr: Python memory leak detection class.
class_docstr_tok: ["Python","memory","leak","detection","class","."]
code: def __init__(self):
      self._snapshots = []
  
      # cache the function used by mark_stack_trace_and_call to avoid
      # contaminating the leak measurement.
      def _record_snapshot():
          self._snapshots.append(_create_python_object_snapshot())
  
      self._record_snapshot = _record_snapshot
  
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 1 to create a new _PythonMemoryChecker object from inherited base classes: object with example: obj = _PythonMemoryChecker()