code: def test_pytester_assert_outcomes_warnings(
      pytester: Pytester,
  ) -> None:
      pytester.makepyfile(
          """
          import warnings
  
          def test_with_warning():
              warnings.warn(UserWarning("some custom warning"))
          """
      )
      result = pytester.runpytest()
      result.assert_outcomes(passed=1, warnings=1)
      # If warnings is not passed, it is not checked at all.
      result.assert_outcomes(passed=1)
  
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 36 for calling a global function with example usage: test_pytester_assert_outcomes_warnings(pytester) without return types