parameters: (node)
return_statement: return path_to_root, n.index
docstring: Return path to root by idx as a list, and root index.
docstring_summary: Return path to root by idx as a list, and root index.
docstring_tokens: Return path to root by idx as a list and root index .
function: def get_path_to_root(node):
      ''' Return path to root by idx as a list, and root index. '''
      path_to_root = []
      n = node
      while n.parent is not None:
          path_to_root.append(n.index)
          n = n.parent
      path_to_root.append(n.index)
      return path_to_root, n.index
function_tokens: def get_path_to_root ( node ) : path_to_root = [ ] n = node while n . parent is not None : path_to_root . append ( n . index ) n = n . parent path_to_root . append ( n . index ) return path_to_root , n . index