(self, node):         if isinstance(node, tuple):  # Text node             node, key = node             assert key in ("text", "tail"), "Text nodes are text or tail, found %s" % key             if key == "text":                 