code: def test_environment_variables_multitenancy(shutdown_only):
      ray.init(
          runtime_env={
              "env_vars": {
                  "foo1": "bar1",
                  "foo2": "bar2",
              }
          }
      )
  
      @ray.remote
      def get_env(key):
          return os.environ.get(key)
  
      assert ray.get(get_env.remote("foo1")) == "bar1"
      assert ray.get(get_env.remote("foo2")) == "bar2"
      assert (
          ray.get(
              get_env.options(
                  runtime_env={
                      "env_vars": {
                          "foo1": "baz1",
                      }
                  }
              ).remote("foo1")
          )
          == "baz1"
      )
      assert (
          ray.get(
              get_env.options(
                  runtime_env={
                      "env_vars": {
                          "foo1": "baz1",
                      }
                  }
              ).remote("foo2")
          )
          == "bar2"
      )
  
file_path: ray/python/ray/tests/test_runtime_env_env_vars.py
imports: import os
  import sys
  import pytest
  import ray
label_desc: Use image node_id 4 for calling a global function with example usage: test_environment_variables_multitenancy(shutdown_only) and returns: os