class_docstr: A TestCase which runs tests multiple times, collecting reference counts.
code: def _getRefcounts(self):
      copyreg.dispatch_table.clear()
      copyreg.dispatch_table.update(self._saved_pickle_registry)
      # It is sometimes necessary to gc.collect() multiple times, to ensure
      # that all objects can be collected.
      gc.collect()
      gc.collect()
      gc.collect()
      return sys.gettotalrefcount()
  
file_path: coremltools/deps/protobuf/python/google/protobuf/internal/testing_refleaks.py
imports: import gc
  import sys
label_desc: Use image node_id 2 for calling the ReferenceLeakCheckerTestCase obj's underlying member method code with example usage: obj._getRefcounts() and returns: sys