code: def tempdir(**kwargs):
      # A context manager that defines a lifetime of a temporary directory.
      ignore_errors = kwargs.pop("ignore_errors", False)
  
      temp_dir = tempfile.mkdtemp(**kwargs)
      try:
          yield temp_dir
      finally:
          shutil.rmtree(temp_dir, ignore_errors=ignore_errors)
  
imports: import collections
  import contextlib
  import shutil
  import sys
  import tempfile
  import numpy
  import six
  import chainer
  from chainer.utils.array import size_of_shape
  from chainer.utils.array import sum_to
  from chainer.utils.conv import get_conv_outsize
  from chainer.utils.conv import get_deconv_outsize
  from chainer.utils.error import _format_array_props
  from chainer.utils.experimental import experimental
  from chainer.utils.meta import enable_final
  from chainer.utils.meta import final
  from chainer.utils.nondeterministic import nondeterministic
  from chainer.utils.sparse import CooMatrix
  from chainer.utils.sparse import get_order
  from chainer.utils.sparse import to_coo
label_desc: Use image node_id 3 for calling a global function with example usage: tempdir() without return types