code: function simplify(folds) {
          if (!folds) {
              return;
          }
          var res = {}, range;
          Object.keys(folds).forEach(function (line) {
              range = folds[line];
              res[line] = Array.isArray(range) ? range : [[range.from.line, range.from.ch], [range.to.line, range.to.ch]];
          });
          return res;
      }
docs: Simplifies the fold ranges into an array of pairs of numbers.
  @param {!Object} folds the raw fold ranges indexed by line numbers
  @return {Object} an object whose keys are line numbers and the values are array
  of two 2-element arrays. First array contains [from.line, from.ch] and the second contains [to.line, to.ch]