code: def test_tempdir_privilege(shutdown_only):
      tmp_dir = ray._private.utils.get_ray_temp_dir()
      os.makedirs(tmp_dir, exist_ok=True)
      os.chmod(tmp_dir, 0o000)
      ray.init(num_cpus=1)
      session_dir = (
          ray._private.worker._global_node.get_session_dir_path()
      )
      assert os.path.exists(
          session_dir
      ), "Specified socket path not found."
  
file_path: ray/python/ray/tests/test_tempfile.py
imports: import os
  import shutil
  import sys
  import time
  import pytest
  import ray
  from ray._private.test_utils import check_call_ray, wait_for_condition
label_desc: Use image node_id 8 for calling a global function with example usage: test_tempdir_privilege(shutdown_only) without return types