class_docstr: Create and return a temporary directory.  This has the same
  behavior as mkdtemp but can be used as a context manager.
  
  Upon exiting the context, the directory and everything contained
  in it are removed.
docstr: Examples
  --------
  >>> import os
  >>> with TemporaryDirectory() as tmpdir:
  ...     fname = os.path.join(tmpdir, 'example_file.txt')
  ...     with open(fname, 'wt') as fobj:
  ...         _ = fobj.write('a string\n')
  >>> os.path.exists(tmpdir)
  False
code: def __init__(self, suffix="", prefix=tempfile.template, dir=None):
      """
      Examples
      --------
      >>> import os
      >>> with TemporaryDirectory() as tmpdir:
      ...     fname = os.path.join(tmpdir, 'example_file.txt')
      ...     with open(fname, 'wt') as fobj:
      ...         _ = fobj.write('a string\\n')
      >>> os.path.exists(tmpdir)
      False
      """
      return super().__init__(suffix, prefix, dir)
  
file_path: nibabel/nibabel/tmpdirs.py
imports: import os
  import tempfile
  from contextlib import contextmanager
  from .deprecated import deprecate_with_version
label_desc: Use image node_id 1 to create a new TemporaryDirectory object from inherited base classes: tempfile with example: obj = TemporaryDirectory(suffix, prefix, dir)