code: def pytest_sessionfinish(self) -> None:
      if hasattr(self.config, "workerinput"):
          # Do not update cache if this process is a xdist worker to prevent
          # race conditions (#10641).
          return
      self.cache.set(STEPWISE_CACHE_DIR, self.lastfailed)
  
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 6 for calling the StepwisePlugin obj's underlying member method code with example usage: obj.pytest_sessionfinish() without return types