'Returns the root node of a parser tree. The returned node doesn\'t have
a parent node like all the other nodes/leaves.'

def get_root_node(self):

    scope = self
    while (scope.parent is not None):
        scope = scope.parent
    return scope
