code: def test_tmp_env():
      os.environ["TEST_VAL1"] = "1"
      try:
          with tmp.environment({"TEST_VAL2": "2"}):
              assert os.environ.get("TEST_VAL1") is None
              assert os.environ.get("TEST_VAL2") == "2"
              raise AssertionError()
      except AssertionError:
          assert os.environ.get("TEST_VAL1") == "1"
  
imports: import os
  import library.python.tmp
label_desc: Use image node_id 1 for calling a global function with example usage: test_tmp_env() without return types