code: def gettempdir():
      
      global tempdir
      if tempdir is None:
          _once_lock.acquire()
          try:
              if tempdir is None:
                  tempdir = _get_default_tempdir()
          finally:
              _once_lock.release()
      return tempdir
docs: Accessor for tempfile.tempdir.