code: def pytest_collection_modifyitems(self, session, config, items):
      if not self.active:
          return
      if not self.lastfailed:
          self.report_status = (
              "no previously failed tests, not skipping."
          )
          return
  
      already_passed = []
      found = False
  
      # Make a list of all tests that have been run before the last failing one.
      for item in items:
          if item.nodeid == self.lastfailed:
              found = True
              break
          else:
              already_passed.append(item)
  
      # If the previously failed test was not found among the test items,
      # do not skip any tests.
      if not found:
          self.report_status = (
              "previously failed test not found, not skipping."
          )
          already_passed = []
      else:
          self.report_status = (
              "skipping {} already passed items.".format(
                  len(already_passed)
              )
          )
  
      for item in already_passed:
          items.remove(item)
  
      config.hook.pytest_deselected(items=already_passed)
  
file_path: catboost/contrib/python/pytest/py2/_pytest/stepwise.py
imports: import pytest
label_desc: Use image node_id 3 for calling the StepwisePlugin obj's underlying member method code with example usage: obj.pytest_collection_modifyitems(session, config, items) without return types