code: def test_setup_teardown_warnings(pytester: Pytester) -> None:
      pytester.makepyfile(
          """
          import warnings
          import pytest
  
          @pytest.fixture
          def fix():
              warnings.warn(UserWarning("warning during setup"))
              yield
              warnings.warn(UserWarning("warning during teardown"))
  
          def test_func(fix):
              pass
      """
      )
      result = pytester.runpytest()
      result.stdout.fnmatch_lines(
          [
              "*== %s ==*" % WARNINGS_SUMMARY_HEADER,
              "*test_setup_teardown_warnings.py:6: UserWarning: warning during setup",
              '*warnings.warn(UserWarning("warning during setup"))',
              "*test_setup_teardown_warnings.py:8: UserWarning: warning during teardown",
              '*warnings.warn(UserWarning("warning during teardown"))',
              "* 1 passed, 2 warnings*",
          ]
      )
  
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 3 for calling a global function with example usage: test_setup_teardown_warnings(pytester) without return types