code: public SharedTreeNode makeRightChildNode(SharedTreeNode parent) {
      SharedTreeNode child = new SharedTreeNode(nodesArray.size(), parent, subgraphNumber, parent.getDepth() + 1);
      nodesArray.add(child);
      makeRightEdge(parent, child);
      return child;
    }
docs: Make the right child of a node.
  @param parent Parent node
  @return The new child node