code: def pytest_runtest_call(item):
      """
      Needed to grab the item.location information
      """
      global warnings_recorder
  
      if os.environ.get("PYTHONWARNINGS") == "ignore":
          yield
          return
  
      warnings_recorder.__enter__()
      yield
      warnings_recorder.__exit__(None, None, None)
  
      for warning in warnings_recorder.list:
          # this code is adapted from python official warnings module
  
          # Search the filters
          for filter in warnings.filters:
              action, msg, cat, mod, ln = filter
  
              module = warning.filename or "<unknown>"
              if module[-3:].lower() == ".py":
                  module = module[
                      :-3
                  ]  # XXX What about leading pathname?
  
              if (
                  (msg is None or msg.match(str(warning.message)))
                  and issubclass(warning.category, cat)
                  and (mod is None or mod.match(module))
                  and (ln == 0 or warning.lineno == ln)
              ):
                  break
          else:
              action = warnings.defaultaction
  
          # Early exit actions
          if action == "ignore":
              continue
  
          warning.item = item
          quadruplet: tuple[str, int, type[Warning], str] = (
              warning.filename,
              warning.lineno,
              warning.category,
              str(warning.message),
          )
  
          if quadruplet in captured_warnings:
              captured_warnings_count[quadruplet] += 1
              continue
          else:
              captured_warnings[quadruplet] = warning
              captured_warnings_count[quadruplet] = 1
  
imports: from __future__ import annotations
  import json
  import os
  import platform
  import subprocess
  import sys
  import warnings
  from contextlib import ExitStack, suppress
  from datetime import datetime, timedelta
  from pathlib import Path
  from typing import TYPE_CHECKING
  import pytest
  import time_machine
  from itsdangerous import URLSafeSerializer
label_desc: Use image node_id 41 for calling a global function with example usage: pytest_runtest_call(item) without return types