code: def ray_tmp_dir(
      config: Dict[Any, Any], run_env: str
  ) -> Generator[Any, None, None]:
      out = sdk.run_on_cluster(
          config,
          run_env=run_env,
          cmd="echo $(mktemp -d)",
          with_output=True,
      ).decode()
  
      tmppath = [
          x
          for x in out.strip().split()
          if x.startswith("/tmp/") and "ray-config" not in x  # nosec
      ]
      assert len(tmppath) == 1, f"tmppath is : {tmppath}"
      tmp_path = tmppath[0]
      log.info(f"Created temp path on remote server {tmp_path}")
      yield tmp_path
      sdk.run_on_cluster(
          config, run_env=run_env, cmd=f"rm -rf {tmp_path}"
      )
  
file_path: hydra/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_launcher_util.py
imports: import logging
  import os
  from contextlib import contextmanager
  from subprocess import PIPE, Popen
  from typing import Any, Dict, Generator, List, Tuple
  import ray
  from hydra.core.hydra_config import HydraConfig
  from hydra.core.singleton import Singleton
  from hydra.core.utils import JobReturn, run_job, setup_globals
  from hydra.types import HydraContext, TaskFunction
  from omegaconf import DictConfig, OmegaConf
label_desc: Use image node_id 5 for calling a global function with example usage: ray_tmp_dir(config, run_env) without return types