def __init__(self, node: T.Optional[BaseNode]=None):
    if (node is None):
        self.node = self._new_node()
    else:
        self.node = node
    self.node_type = None
    for i in self.supported_nodes():
        if isinstance(self.node, i):
            self.node_type = i
def __init__(self, node: T.Optional[BaseNode]=None):
    if (node is None):
        self.node = self._new_node()
    else:
        self.node = node
    self.node_type = None
    for i in self.supported_nodes():
        if isinstance(self.node, i):
            self.node_type = i