code: def pytest_runtestloop(session: "Session") -> Optional[object]:
      """Perform the main runtest loop (after collection finished).
  
      The default hook implementation performs the runtest protocol for all items
      collected in the session (``session.items``), unless the collection failed
      or the ``collectonly`` pytest option is set.
  
      If at any point :py:func:`pytest.exit` is called, the loop is
      terminated immediately.
  
      If at any point ``session.shouldfail`` or ``session.shouldstop`` are set, the
      loop is terminated after the runtest protocol for the current item is finished.
  
      :param session: The pytest session object.
  
      Stops at first non-None result, see :ref:`firstresult`.
      The return value is not used, but only stops further processing.
      """
  
imports: from pathlib import Path
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Mapping
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  from typing import TYPE_CHECKING
  from typing import Union
  from pluggy import HookspecMarker
label_desc: Use image node_id 24 for calling a global function with example usage: pytest_runtestloop(session) without return types