code: def test_filterwarnings_mark(
      pytester: Pytester, default_config
  ) -> None:
      """Test ``filterwarnings`` mark works and takes precedence over command
      line and ini options."""
      if default_config == "ini":
          pytester.makeini(
              """
              [pytest]
              filterwarnings = always::RuntimeWarning
          """
          )
      pytester.makepyfile(
          """
          import warnings
          import pytest
  
          @pytest.mark.filterwarnings('ignore::RuntimeWarning')
          def test_ignore_runtime_warning():
              warnings.warn(RuntimeWarning())
  
          @pytest.mark.filterwarnings('error')
          def test_warning_error():
              warnings.warn(RuntimeWarning())
  
          def test_show_warning():
              warnings.warn(RuntimeWarning())
      """
      )
      result = pytester.runpytest(
          "-W always::RuntimeWarning"
          if default_config == "cmdline"
          else ""
      )
      result.stdout.fnmatch_lines(
          ["*= 1 failed, 2 passed, 1 warning in *"]
      )
  
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 8 for calling a global function with example usage: test_filterwarnings_mark(pytester, default_config) without return types