code: def pytest_sessionfinish(self, session):
      if self.active:
          self.config.cache.set("cache/stepwise", self.lastfailed)
      else:
          # Clear the list of failing tests if the plugin is not active.
          self.config.cache.set("cache/stepwise", [])
  
file_path: catboost/contrib/python/pytest/py2/_pytest/stepwise.py
imports: import pytest
label_desc: Use image node_id 6 for calling the StepwisePlugin obj's underlying member method code with example usage: obj.pytest_sessionfinish(session) without return types