code: def test_setup_func_basic(shutdown_only, is_module):
      def configure_logging(level: int):
          logger = logging.getLogger("")
          logger.setLevel(level)
  
      if is_module:
          runtime_env = {
              "worker_process_setup_hook": "ray.tests.test_runtime_env_setup_func._hook",  # noqa
              "env_vars": {"ABC": "123"},
          }
      else:
          runtime_env = {
              "worker_process_setup_hook": lambda: configure_logging(
                  logging.DEBUG
              ),
              "env_vars": {"ABC": "123"},
          }
  
      ray.init(num_cpus=1, runtime_env=runtime_env)
  
      @ray.remote
      def f(level):
          logger = logging.getLogger("")
          assert (
              logging.getLevelName(logger.getEffectiveLevel()) == level
          )
          return True
  
      @ray.remote
      class Actor:
          def __init__(self, level):
              logger = logging.getLogger("")
              assert (
                  logging.getLevelName(logger.getEffectiveLevel())
                  == level
              )
  
          def ready(self):
              return True
  
          def get_env_var(self, key):
              return os.getenv(key)
  
      # Test basic.
      for _ in range(10):
          assert ray.get(f.remote("DEBUG"))
      a = Actor.remote("DEBUG")
      assert ray.get(a.__ray_ready__.remote())
  
      # Make sure env var is not overwritten.
      assert ray.get(a.get_env_var.remote("ABC")) == "123"
  
file_path: ray/python/ray/tests/test_runtime_env_setup_func.py
imports: import threading
  import os
  import sys
  import logging
  import tempfile
  import platform
  import pytest
  import ray
  from ray.job_submission import JobSubmissionClient, JobStatus
  from ray._private.test_utils import format_web_url, wait_for_condition
label_desc: Use image node_id 2 for calling a global function with example usage: test_setup_func_basic(shutdown_only, is_module) and returns: True, True, os