code: function (selected) {
              var val = this.getVal(),
                  data,
                  index;
  
              selected = selected.closest(".select2-search-choice");
  
              if (selected.length === 0) {
                  throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
              }
  
              data = selected.data("select2-data");
  
              index = indexOf(this.id(data), val);
  
              if (index >= 0) {
                  val.splice(index, 1);
                  this.setVal(val);
                  if (this.select) this.postprocessResults();
              }
              selected.remove();
              this.triggerChange({ removed: data });
          }
docs: multi