code: def pytest_warning_captured(warning_message, when, item):
      """
      Process a warning captured by the internal pytest warnings plugin.
  
      :param warnings.WarningMessage warning_message:
          The captured warning. This is the same object produced by :py:func:`warnings.catch_warnings`, and contains
          the same attributes as the parameters of :py:func:`warnings.showwarning`.
  
      :param str when:
          Indicates when the warning was captured. Possible values:
  
          * ``"config"``: during pytest configuration/initialization stage.
          * ``"collect"``: during test collection.
          * ``"runtest"``: during test execution.
  
      :param pytest.Item|None item:
          **DEPRECATED**: This parameter is incompatible with ``pytest-xdist``, and will always receive ``None``
          in a future release.
  
          The item being executed if ``when`` is ``"runtest"``, otherwise ``None``.
      """
  
imports: from pluggy import HookspecMarker
  from _pytest.deprecated import PYTEST_LOGWARNING
label_desc: Use image node_id 48 for calling a global function with example usage: pytest_warning_captured(warning_message, when, item) without return types