code: def pytest_runtest_logfinish(nodeid, location):
      if session_timed_out:
          pytest.exit("timeout")
  
imports: import os
  import signal
  from types import FrameType
  from typing import Optional
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: pytest_runtest_logfinish(nodeid, location) without return types