code: def test_serve_namespace(shutdown_ray_and_serve, ray_namespace):
      """Test that Serve starts in SERVE_NAMESPACE regardless of driver namespace."""
  
      with ray.init(namespace=ray_namespace) as ray_context:
  
          @serve.deployment
          def f(*args):
              return "got f"
  
          serve.run(f.bind())
  
          actors = list_actors(
              address=ray_context.address_info["address"],
              filters=[("state", "=", "ALIVE")],
          )
  
          assert len(actors) == 3
  
          # All actors should be in the SERVE_NAMESPACE, so none of these calls
          # should throw an error.
          for actor in actors:
              ray.get_actor(
                  name=actor["name"], namespace=SERVE_NAMESPACE
              )
  
          assert requests.get("http://localhost:8000/f").text == "got f"
  
imports: import os
  import subprocess
  import sys
  from contextlib import contextmanager
  from tempfile import NamedTemporaryFile
  import pytest
  import requests
  import ray
  import ray._private.state
  import ray.actor
  from ray import serve
  from ray._private.test_utils import wait_for_condition
  from ray.exceptions import RayActorError
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME, SERVE_NAMESPACE
  from ray.serve.context import _get_global_client
  from ray.tests.conftest import call_ray_stop_only
  from ray.util.state import list_actors
label_desc: Use image node_id 7 for calling a global function with example usage: test_serve_namespace(shutdown_ray_and_serve, ray_namespace) and returns: str