code: def ray_client_instance(scope="module"):
      port = random.randint(MIN_DYNAMIC_PORT, MAX_DYNAMIC_PORT)
      subprocess.check_output(
          [
              "ray",
              "start",
              "--head",
              "--num-cpus",
              "16",
              "--ray-client-server-port",
              f"{port}",
          ]
      )
      try:
          yield f"localhost:{port}"
      finally:
          subprocess.check_output(["ray", "stop", "--force"])
  
file_path: ray/python/ray/serve/tests/test_ray_client.py
imports: import random
  import subprocess
  import sys
  import time
  import pytest
  import requests
  import ray
  from ray import serve
  from ray._private.test_utils import run_string_as_driver
label_desc: Use image node_id 1 for calling a global function with example usage: ray_client_instance(scope) without return types