class_docstr: The base class for nodes and leaves.
docstr: Returns the root node of a parser tree. The returned node doesn't have
  a parent node like all the other nodes/leaves.
docstr_tok: ["Returns","the","root","node","of","a","parser","tree",".","The","returned","node","does","n't","have","a","parent","node","like","all","the","other","nodes\/leaves","."]
code: def get_root_node(self):
      """
      Returns the root node of a parser tree. The returned node doesn't have
      a parent node like all the other nodes/leaves.
      """
      scope = self
      while scope.parent is not None:
          scope = scope.parent
      return scope
  
imports: import sys
  from abc import abstractmethod, abstractproperty
  from parso._compatibility import utf8_repr, encoding
  from parso.utils import split_lines
label_desc: Use image node_id 1 for calling the NodeOrLeaf obj's underlying member method code with example usage: obj.get_root_node() and returns: scope