code: def test_tempdir_commandline():
      shutil.rmtree(
          ray._private.utils.get_ray_temp_dir(), ignore_errors=True
      )
      check_call_ray(
          [
              "start",
              "--head",
              "--temp-dir="
              + os.path.join(
                  ray._private.utils.get_user_temp_dir(),
                  "i_am_a_temp_dir2",
              ),
              "--port",
              "0",
          ]
      )
      assert os.path.exists(
          os.path.join(
              ray._private.utils.get_user_temp_dir(), "i_am_a_temp_dir2"
          )
      ), "Specified temp dir not found."
      assert not os.path.exists(
          ray._private.utils.get_ray_temp_dir()
      ), "Default temp dir should not exist."
      check_call_ray(["stop"])
      shutil.rmtree(
          os.path.join(
              ray._private.utils.get_user_temp_dir(), "i_am_a_temp_dir2"
          ),
          ignore_errors=True,
      )
  
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 5 for calling a global function with example usage: test_tempdir_commandline() without return types