code: def test_simple_env_modification_plugin(
      set_runtime_env_plugins, ray_start_regular
  ):
      _, tmp_file_path = tempfile.mkstemp()
  
      @ray.remote
      def f():
          import psutil
  
          with open(tmp_file_path, "r") as f:
              content = f.read().strip()
          return {
              "env_value": os.environ[MyPlugin.env_key],
              "tmp_content": content,
              "nice": psutil.Process().nice(),
          }
  
      with pytest.raises(RuntimeEnvSetupError, match="not allowed"):
          ray.get(
              f.options(runtime_env={MY_PLUGIN_NAME: "fail"}).remote()
          )
  
      if os.name != "nt":
          output = ray.get(
              f.options(
                  runtime_env={
                      MY_PLUGIN_NAME: {
                          "env_value": 42,
                          "tmp_file": tmp_file_path,
                          "tmp_content": "hello",
                          # See https://en.wikipedia.org/wiki/Nice_(Unix)
                          "prefix_command": "nice -n 19",
                      }
                  }
              ).remote()
          )
  
          assert output == {
              "env_value": "42",
              "tmp_content": "hello",
              "nice": 19,
          }
  
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 1 for calling a global function with example usage: test_simple_env_modification_plugin(set_runtime_env_plugins, ray_start_regular) and returns: dict