code: public LCAInfo<O, N> lcaInfo(N node1, N node2) {
          int d1 = node1.depth;
          int d2 = node2.depth;
  
          int ddiff = d2 - d1;
  
          boolean swap = false;
  
          N curr1, curr2;
          if (ddiff >= 0) {
              curr1 = node1;
              curr2 = node2;
          } else {
              curr1 = node2;
              curr2 = node1;
              ddiff *= -1;
              swap = true;
          }
  
          O out1 = null, out2 = null;
          while (ddiff > 0) {
              out2 = curr2.parentOutcome;
              curr2 = curr2.parent;
              ddiff--;
          }
  
          if (curr1 == curr2) {
              return new LCAInfo<>(curr1, out1, out2, swap);
          }
  
          while (curr1 != curr2) {
              out1 = curr1.parentOutcome;
              curr1 = curr1.parent;
              out2 = curr2.parentOutcome;
              curr2 = curr2.parent;
          }
  
          return new LCAInfo<>(curr1, out1, out2, swap);
      }
docs: Fetches for two nodes information about their lowest common ancestor in {@code this} discrimination tree. {@link
  LCAInfo#subtree1Label} will reference the label of the outgoing child transition for the node closer to the LCA,
  {@link LCAInfo#subtree2Label} the label of the outgoing child transition for the node farther away from the LCA.
  If both nodes have equal depth, {@link LCAInfo#subtree1Label} contains {@code node1}'s label and {@link
  LCAInfo#subtree2Label} {@code node2}'s label.
  <p>
  Either {@link LCAInfo#subtree1Label} or {@link LCAInfo#subtree2Label} is {@code null}, if {@code node1} ({@code
  node2} respectively) already is the LCA.
  
  @param node1
  first node
  @param node2
  second node
  
  @return the corresponding {@link LCAInfo}.