code: function getBalanceState(node) {
    var heightDifference = node.leftHeight() - node.rightHeight();
    switch (heightDifference) {
      case -2: return BalanceState.UNBALANCED_RIGHT;
      case -1: return BalanceState.SLIGHTLY_UNBALANCED_RIGHT;
      case 1: return BalanceState.SLIGHTLY_UNBALANCED_LEFT;
      case 2: return BalanceState.UNBALANCED_LEFT;
      default: return BalanceState.BALANCED;
    }
  }
docs: Gets the balance state of a node, indicating whether the left or right
  sub-trees are unbalanced.
  
  @private
  @param {Node} node The node to get the difference from.
  @return {BalanceState} The BalanceState of the node.