code: def test_recording(self) -> None:
      rec = WarningsRecorder(_ispytest=True)
      with rec:
          assert not rec.list
          warnings.warn_explicit("hello", UserWarning, "xyz", 13)
          assert len(rec.list) == 1
          warnings.warn(DeprecationWarning("hello"))
          assert len(rec.list) == 2
          warn = rec.pop()
          assert str(warn.message) == "hello"
          values = rec.list
          rec.clear()
          assert len(rec.list) == 0
          assert values is rec.list
          pytest.raises(AssertionError, rec.pop)
  
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 1 for calling the TestWarningsRecorderChecker obj's underlying member method code with example usage: obj.test_recording() without return types