docstr: #4243
code: def test_warn_stacklevel(self) -> None:
      """#4243"""
      rec = WarningsRecorder(_ispytest=True)
      with rec:
          warnings.warn("test", DeprecationWarning, 2)
  
imports: import warnings
  from typing import List
  from typing import Optional
  from typing import Type
  import pytest
  from _pytest.pytester import Pytester
  from _pytest.recwarn import WarningsRecorder
label_desc: Use image node_id 2 for calling the TestWarningsRecorderChecker obj's underlying member method code with example usage: obj.test_warn_stacklevel() without return types