code: def test_ray_start_worker_cannot_specify_temp_dir(
      configure_lang, tmp_path, cleanup_ray
  ):
      """
      Verify ray start --temp-dir raises an exception when it is used without --head.
      """
      runner = CliRunner(env={"RAY_USAGE_STATS_PROMPT_ENABLED": "0"})
      temp_dir = os.path.join("/tmp", uuid.uuid4().hex)
      result = runner.invoke(
          scripts.start,
          [
              "--head",
          ],
      )
      print(result.output)
      _die_on_error(result)
      result = runner.invoke(
          scripts.start,
          [
              f"--address=localhost:{ray_constants.DEFAULT_PORT}",
              f"--temp-dir={temp_dir}",
          ],
      )
      assert result.exit_code == 0
      assert "--head` is a required flag to use `--temp-dir`" in str(
          result.output
      )
  
imports: import glob
  import multiprocessing
  import multiprocessing.connection
  import os
  import re
  import sys
  import tempfile
  import time
  import uuid
  from contextlib import contextmanager
  from pathlib import Path
  from typing import Optional
  from unittest.mock import MagicMock, patch
  import moto
  import pytest
  from click.testing import CliRunner
  from moto import mock_ec2, mock_iam
  from testfixtures import Replacer
  from testfixtures.popen import MockPopen, PopenBehaviour
  import ray
  import ray.autoscaler._private.aws.config
  import ray.autoscaler._private.constants
  import ray._private.ray_constants
  import ray.scripts.scripts
  from ray._private.test_utils import wait_for_condition
  from ray.cluster_utils import cluster_not_supported
  from ray.util.state import list_nodes
  import psutil
label_desc: Use image node_id 16 for calling a global function with example usage: test_ray_start_worker_cannot_specify_temp_dir(configure_lang, tmp_path, cleanup_ray) without return types