code: def assert_result_warns(result, msg) -> None:
      result.stdout.fnmatch_lines(
          ["*PytestAssertRewriteWarning: %s*" % msg]
      )
  
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 1 for calling the TestAssertionWarnings obj's underlying member method code with example usage: obj.assert_result_warns(result, msg) without return types