code: def test_hide_pytest_internal_warnings(
      pytester: Pytester, ignore_pytest_warnings
  ) -> None:
      """Make sure we can ignore internal pytest warnings using a warnings filter."""
      pytester.makepyfile(
          """
          import pytest
          import warnings
  
          warnings.warn(pytest.PytestWarning("some internal warning"))
  
          def test_bar():
              pass
      """
      )
      if ignore_pytest_warnings == "ini":
          pytester.makeini(
              """
              [pytest]
              filterwarnings = ignore::pytest.PytestWarning
          """
          )
      args = (
          ["-W", "ignore::pytest.PytestWarning"]
          if ignore_pytest_warnings == "cmdline"
          else []
      )
      result = pytester.runpytest(*args)
      if ignore_pytest_warnings != "no":
          assert WARNINGS_SUMMARY_HEADER not in result.stdout.str()
      else:
          result.stdout.fnmatch_lines(
              [
                  "*== %s ==*" % WARNINGS_SUMMARY_HEADER,
                  "*test_hide_pytest_internal_warnings.py:4: PytestWarning: some internal warning",
                  "* 1 passed, 1 warning *",
              ]
          )
  
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 14 for calling a global function with example usage: test_hide_pytest_internal_warnings(pytester, ignore_pytest_warnings) without return types