code: def pytest_sessionstart():
      timeout = os.environ.get("PYTEST_GLOBAL_TIMEOUT", "")
      if not timeout:
          return
      if timeout.endswith("s"):
          timeout = int(timeout[:-1])
      elif timeout.endswith("m"):
          timeout = int(timeout[:-1]) * 60
      else:
          raise ValueError(
              f"Timeout value {timeout} should either end with 'm' (minutes) or 's' (seconds)."
          )
  
      signal.signal(signal.SIGALRM, handle_timeout)
      signal.setitimer(signal.ITIMER_REAL, timeout)
  
imports: import os
  import signal
  from types import FrameType
  from typing import Optional
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_sessionstart() without return types