code: def test_port_conflict(
      listen_port, call_ray_stop_only, shutdown_only
  ):
      try:
          subprocess.check_output(
              [
                  "ray",
                  "start",
                  "--head",
                  "--port",
                  "9989",
                  "--dashboard-port",
                  "9999",
                  "--include-dashboard=True",
              ],
              stderr=subprocess.PIPE,
          )
      except subprocess.CalledProcessError as e:
          assert b"already occupied" in e.stderr
  
      with pytest.raises(ValueError, match="already occupied"):
          ray.init(dashboard_port=9999, include_dashboard=True)
  
imports: import os
  import re
  import subprocess
  import sys
  import time
  import psutil
  import pytest
  import requests
  import ray
  from ray._private import ray_constants
  from ray._private.test_utils import run_string_as_driver, wait_for_condition
label_desc: Use image node_id 4 for calling a global function with example usage: test_port_conflict(listen_port, call_ray_stop_only, shutdown_only) without return types