code: def __init__(self, interactive=True, logfile=None):
      DeviceMemoryPool.__init__(self)
      self.last_free, _ = cuda.mem_get_info()
      self.interactive = interactive
  
      if logfile is None:
          import sys
  
          logfile = sys.stdout
  
      self.logfile = logfile
  
      from weakref import WeakKeyDictionary
  
      self.blocks = WeakKeyDictionary()
  
      if interactive:
          from pytools.diskdict import DiskDict
  
          self.stacktrace_mnemonics = DiskDict(
              "pycuda-stacktrace-mnemonics"
          )
  
imports: import pycuda.driver
  import pycuda._driver
  import numpy
  from pycuda.compyte.dtypes import register_dtype, get_or_register_dtype, _fill_dtype_registry, dtype_to_ctype
label_desc: Use image node_id 1 to create a new DebugMemoryPool object from inherited base classes: DeviceMemoryPool with example: obj = DebugMemoryPool(interactive, logfile)