class_docstr: Class for creating and auto-destroying temp dir
  
  This is designed to be used with testing modules.
  
  We cannot simply use __del__() method for cleanup here because the rmtree
  function may be cleaned up before this object, so we use the atexit module
  instead.
code: def cleanup(self):
      rmtree(self._path, ignore_errors=True)
  
imports: import io
  import os
  from os import path
  import inspect
  import json
  import sys
  import platform
  import getopt
  import traceback
  import tempfile
  import atexit
  from shutil import rmtree
  import numpy
  from .event import EmitterGroup, EventEmitter, Event
  from .logs import logger, set_log_level, use_log_level
label_desc: Use image node_id 3 for calling the _TempDir obj's underlying member method code with example usage: obj.cleanup() without return types