code: def test_environment():
      name1 = "MXNET_TEST_ENV_VAR_1"
      name2 = "MXNET_TEST_ENV_VAR_2"
  
      # Test that a variable can be set in the python and backend environment
      with environment(name1, "42"):
          assert_equal(os.environ.get(name1), "42")
          assert_equal(getenv(name1), "42")
  
      # Test dict form of invocation
      env_var_dict = {name1: "1", name2: "2"}
      with environment(env_var_dict):
          for key, value in env_var_dict.items():
              assert_equal(os.environ.get(key), value)
              assert_equal(getenv(key), value)
  
file_path: mxnet/tests/python/unittest/test_base.py
imports: import mxnet
  from numpy.testing import assert_equal
  from mxnet.base import data_dir
  from mxnet.test_utils import environment
  from mxnet.util import getenv
  from common import with_environment
  import os
  import logging
  import os.path
  import platform
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_environment() without return types