function insertToTree(index, opt_duplicate) {
  var unique = !opt_duplicate;
  var tree = new lf.index.BTree('test', c, unique);
  var i = 0;
  while (i < index) {
    tree.add(SEQUENCE[i], SEQUENCE[i]);
    if (opt_duplicate) {
      tree.add(SEQUENCE[i], SEQUENCE[i] * 1000);
    }
    i++;
  }
  return tree;
}
@param {number} index
@param {boolean=} opt_duplicate
@return {!lf.index.BTree} The tree generated