code: def test_setenv() -> None:
      monkeypatch = MonkeyPatch()
      with pytest.warns(pytest.PytestWarning):
          monkeypatch.setenv("XYZ123", 2)  # type: ignore[arg-type]
      import os
  
      assert os.environ["XYZ123"] == "2"
      monkeypatch.undo()
      assert "XYZ123" not in os.environ
  
imports: import os
  import re
  import sys
  import textwrap
  from pathlib import Path
  from typing import Dict
  from typing import Generator
  from typing import Type
  import pytest
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import Pytester
label_desc: Use image node_id 8 for calling a global function with example usage: test_setenv() without return types