def get_reported_items(self, hookrec: HookRecorder) -> list[Item]:
        """Return pytest.Item instances reported by the pytest_collectreport hook"""
        calls = hookrec.getcalls("pytest_collectreport")
        return [
            x
            for call in calls
            for x in call.report.result
            if isinstance(x, pytest.Item)
        ]
Return pytest.Item instances reported by the pytest_collectreport hook
testing/test_collection.py