code: private List<Integer> getPathToRoot(int root, int node) throws WikiApiException {
          List<Integer> pathToRoot = new LinkedList<Integer>();
          List<Integer> shortestPath = new ArrayList<Integer>();
  
          expandPath(root, node, pathToRoot, shortestPath);
  
          if (shortestPath.size() == 0) {
              return null;
          }
          else {
              return shortestPath;
          }
      }
docs: Returns the shortest path from node to root as a list of pageIds of the nodes on the path. Node and root are included in the path node list.
  @param root The root node of the graph.
  @param node A node of the graph.
  @return The shortest path from node to root as a list of pagIs of the nodes on the path; or null if no path exists
  @throws WikiApiException Thrown if errors occurred.