def genitems(self, colitems: Sequence[Item | Collector]) -> list[Item]:
        """Generate all test items from a collection node.

        This recurses into the collection node and returns a list of all the
        test items contained within.

        :param colitems:
            The collection nodes.
        :returns:
            The collected items.
        """
        session = colitems[0].session
        result: list[Item] = []
        for colitem in colitems:
            result.extend(session.genitems(colitem))
        return result
Generate all test items from a collection node.

        This recurses into the collection node and returns a list of all the
        test items contained within.

        :param colitems:
            The collection nodes.
        :returns:
            The collected items.
        
src/_pytest/pytester.py