class_docstr: An object that hooks itself into the gc callbacks to collect
  timing and memory statistics, and log interesting info.
  
  Don't instantiate this directly except for tests.
  Instead, use the global instance.
class_docstr_tok: ["An","object","that","hooks","itself","into","the","gc","callbacks","to","collect","timing","and","memory","statistics",",","and","log","interesting","info",".","Do","n't","instantiate","this","directly","except","for","tests",".","Instead",",","use","the","global","instance","."]
code: def __exit__(self, exc_type, exc_value, traceback):
      self.disable()
  
imports: from __future__ import annotations
  import gc
  import logging
  import threading
  from collections import deque
  import psutil
  from dask.utils import format_bytes
  from distributed.metrics import thread_time
label_desc: Use image node_id 6 for calling the GCDiagnosis obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_value, traceback) without return types