code: def pytest_sessionfinish(session: Session) -> None:
      if not session.config.getoption("stepwise"):
          assert session.config.cache is not None
          if hasattr(session.config, "workerinput"):
              # Do not update cache if this process is a xdist worker to prevent
              # race conditions (#10641).
              return
          # Clear the list of failing tests if the plugin is not active.
          session.config.cache.set(STEPWISE_CACHE_DIR, [])
  
file_path: catboost/contrib/python/pytest/py3/_pytest/stepwise.py
imports: from typing import List
  from typing import Optional
  from typing import TYPE_CHECKING
  import pytest
  from _pytest import nodes
  from _pytest.config import Config
  from _pytest.config.argparsing import Parser
  from _pytest.main import Session
  from _pytest.reports import TestReport
label_desc: Use image node_id 3 for calling a global function with example usage: pytest_sessionfinish(session) without return types