code: def test_default_namespace(shutdown_only):
      info = ray.init(namespace="namespace")
  
      address = info["address"]
  
      # First param of template is the namespace. Second is the redis address.
      driver_template = """
  import ray
  
  ray.init(address="{}")
  
  @ray.remote
  class DetachedActor:
      def ping(self):
          return "pong from other job"
  
  actor = DetachedActor.options(name="Pinger", lifetime="detached").remote()
  ray.get(actor.ping.remote())
      """
  
      # Each run of this script will create a detached actor. Since the drivers
      # are in different namespaces, both scripts should succeed. If they were
      # placed in the same namespace, the second call will throw an exception.
      run_string_as_driver(driver_template.format(address))
      run_string_as_driver(driver_template.format(address))
  
file_path: ray/python/ray/tests/test_namespace.py
imports: import sys
  import time
  import pytest
  import ray
  from ray._private import ray_constants
  from ray._private.test_utils import get_error_message, init_error_pubsub, run_string_as_driver
  from ray.cluster_utils import Cluster
label_desc: Use image node_id 3 for calling a global function with example usage: test_default_namespace(shutdown_only) without return types