code: def tmpdir(request) -> Generator[str, None, None]:
      if request.param == "local":
          tmpdir = _get_local_tmpdir(None)
          tmpdir = tmpdir[len("file://") :]
      else:
          tmpdir = os.environ["HAIL_TEST_STORAGE_URI"]
      tmpdir = os.path.join(tmpdir, secret_alnum_string(5))
  
      fs.mkdir(tmpdir)
      yield tmpdir
      fs.rmtree(tmpdir)
  
imports: from typing import Generator
  import pytest
  import secrets
  import os
  import hail
  import hailtop.fs
  from hail.context import _get_local_tmpdir
  from hail.utils import hadoop_open, hadoop_copy, hadoop_ls
  from hailtop.utils import secret_alnum_string
  from hail.utils.java import FatalError
  from ..helpers import qobtest
label_desc: Use image node_id 2 for calling a global function with example usage: tmpdir(request) without return types