code: def test_job_isolation(call_ray_start):
      # Make sure two jobs with same module name
      # don't interfere with each other
      # (https://github.com/ray-project/ray/issues/19358).
      address = call_ray_start
      lib_template = """
  import ray
  
  @ray.remote
  def task():
      return subtask()
  
  def subtask():
      return {}
  """
      driver_template = """
  import ray
  import lib
  
  ray.init(address="{}")
  assert ray.get(lib.task.remote()) == {}
  """
      with tempfile.TemporaryDirectory() as tmpdir:
          os.makedirs(os.path.join(tmpdir, "v1"))
          v1_lib = os.path.join(tmpdir, "v1", "lib.py")
          v1_driver = os.path.join(tmpdir, "v1", "driver.py")
          with open(v1_lib, "w") as f:
              f.write(lib_template.format(1))
          with open(v1_driver, "w") as f:
              f.write(driver_template.format(address, 1))
  
          os.makedirs(os.path.join(tmpdir, "v2"))
          v2_lib = os.path.join(tmpdir, "v2", "lib.py")
          v2_driver = os.path.join(tmpdir, "v2", "driver.py")
          with open(v2_lib, "w") as f:
              f.write(lib_template.format(2))
          with open(v2_driver, "w") as f:
              f.write(driver_template.format(address, 2))
  
          subprocess.check_call([sys.executable, v1_driver])
          subprocess.check_call([sys.executable, v2_driver])
  
imports: import os
  import subprocess
  import sys
  import tempfile
  import time
  import re
  import json
  from subprocess import Popen, PIPE, STDOUT, list2cmdline
  from typing import List
  from pathlib import Path
  import pytest
  import ray
  from ray._private.test_utils import run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition, format_web_url
  from ray.job_config import JobConfig
  from ray.job_submission import JobSubmissionClient
  from ray.dashboard.modules.job.pydantic_models import JobDetails
label_desc: Use image node_id 3 for calling a global function with example usage: test_job_isolation(call_ray_start) without return types