def match(self, node: NL, results=None) -> bool:
        """Override match() to insist on a leaf node."""
        if not isinstance(node, Leaf):
            return False
        return BasePattern.match(self, node, results)
Override match() to insist on a leaf node.
src/blib2to3/pytree.py