code: def __new__(cls, *args, **kwargs):
      if cls is TmpDir:
          cls = WindowsTmpDir if os.name == "nt" else PosixTmpDir
  
      if sys.version_info >= (3, 12):
          return object.__new__(cls)
      else:  # noqa: RET505
          # init parameter and `_init` method has been removed in Python 3.10.
          kw = {"init": False} if sys.version_info < (3, 10) else {}
          self = cls._from_parts(args, **kw)  # type: ignore[attr-defined]
          if not self._flavour.is_supported:
              raise NotImplementedError(
                  f"cannot instantiate {cls.__name__!r} on your system"
              )
          if sys.version_info < (3, 10):
              self._init()
          return self
  
imports: import os
  import pathlib
  import sys
  from contextlib import contextmanager
  from functools import partialmethod
  from dvc.utils import serialize
label_desc: Use image node_id 4 for calling the TmpDir obj's underlying member method code with example usage: obj.__new__(cls) and returns: object, self