function setToArray(set) {
  var array = new Array();
  set.forEach(function(value) {
    array.push(value);
  }, null);
  return array;
}
TODO(dpapad): Replace this method with Array.from once it becomes available.
@param {!Set<T>} set
@return {!Array<T>}
@template T