code: public static <T extends GraphNode<T>> T getLastChild(T node) {
          return hasChildren(node) ? node.getChildren().get(node.getChildren().size() - 1) : null;
      }
docs: Returns the last child node of the given node or null if node is null or does not have any children.
  
  @param node a node
  @return the last child node of the given node or null if node is null or does not have any children