code: function (modes) {
          var that = this;
  
          return modes.sort(function (a, b) {
              var a_idx, b_idx, i;
              var user_prefixes = that.get('user_prefixes');
  
              for (i = 0; i < user_prefixes.length; i++) {
                  if (user_prefixes[i].mode === a) {
                      a_idx = i;
                  }
              }
  
              for (i = 0; i < user_prefixes.length; i++) {
                  if (user_prefixes[i].mode === b) {
                      b_idx = i;
                  }
              }
  
              if (a_idx < b_idx) {
                  return -1;
              } else if (a_idx > b_idx) {
                  return 1;
              } else {
                  return 0;
              }
          });
      }
docs: Sort modes in order of importance