code: def test_plugin_priority(set_runtime_env_plugins, ray_start_regular):
      config = set_runtime_env_plugins
      _, tmp_file_path = tempfile.mkstemp()
  
      @ray.remote
      def f():
          import os
  
          return os.environ.get(PRIORITY_TEST_ENV_VAR_NAME)
  
      if "bad" in config:
          with pytest.raises(
              RuntimeEnvSetupError, match="has been set"
          ):
              value = ray.get(
                  f.options(
                      runtime_env={
                          PRIORITY_TEST_PLUGIN1_NAME: {},
                          PRIORITY_TEST_PLUGIN2_NAME: {},
                      }
                  ).remote()
              )
      else:
          value = ray.get(
              f.options(
                  runtime_env={
                      PRIORITY_TEST_PLUGIN1_NAME: {},
                      PRIORITY_TEST_PLUGIN2_NAME: {},
                  }
              ).remote()
          )
          assert value is not None
          assert value == "hello world"
  
imports: import asyncio
  import logging
  import os
  from pathlib import Path
  import time
  from unittest import mock
  import tempfile
  import json
  from typing import List
  import pytest
  import ray
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.plugin import RuntimeEnvPlugin
  from ray._private.test_utils import enable_external_redis, wait_for_condition
  from ray.exceptions import RuntimeEnvSetupError
  from ray.runtime_env.runtime_env import RuntimeEnv
label_desc: Use image node_id 4 for calling a global function with example usage: test_plugin_priority(set_runtime_env_plugins, ray_start_regular) and returns: os