code: protected long determineBalance(final IntervalTreeNode node) {
          if (node == null) {
              return 0L;
          }
  
          return (node.hasLeft() ? node.getLeft().getHeight() : 0) -
                  (node.hasRight() ? node.getRight().getHeight() : 0);
      }
docs: Get Balance factor of node N