code: def test_warnings_checker_twice() -> None:
      """Issue #4617"""
      expectation = pytest.warns(UserWarning)
      with expectation:
          warnings.warn("Message A", UserWarning)
      with expectation:
          warnings.warn("Message B", UserWarning)
  
imports: import os
  import sys
  import warnings
  from typing import List
  from typing import Optional
  from typing import Tuple
  import pytest
  from _pytest.fixtures import FixtureRequest
  from _pytest.pytester import Pytester
label_desc: Use image node_id 18 for calling a global function with example usage: test_warnings_checker_twice() without return types