code: def test_spawn_uses_tmphome(pytester: Pytester) -> None:
      tmphome = str(pytester.path)
      assert os.environ.get("HOME") == tmphome
  
      pytester._monkeypatch.setenv("CUSTOMENV", "42")
  
      p1 = pytester.makepyfile(
          """
          import os
  
          def test():
              assert os.environ["HOME"] == {tmphome!r}
              assert os.environ["CUSTOMENV"] == "42"
          """.format(
              tmphome=tmphome
          )
      )
      child = pytester.spawn_pytest(str(p1))
      out = child.read()
      assert child.wait() == 0, out.decode("utf8")
  
imports: import os
  import subprocess
  import sys
  import time
  from types import ModuleType
  from typing import List
  import _pytest.pytester
  import pytest
  from _pytest.config import ExitCode
  from _pytest.config import PytestPluginManager
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import HookRecorder
  from _pytest.pytester import LineMatcher
  from _pytest.pytester import Pytester
  from _pytest.pytester import SysModulesSnapshot
  from _pytest.pytester import SysPathsSnapshot
label_desc: Use image node_id 30 for calling a global function with example usage: test_spawn_uses_tmphome(pytester) without return types