def match(self, node, results=None):
        if not isinstance(node, Leaf):
            return False
        return BasePattern.match(self, node, results)
Override match() to insist on a leaf node.
dataset/ETHPy150Open ctxis/canape/CANAPE.Scripting/Lib/lib2to3/pytree.py/LeafPattern.match