code: function scoresProvider(publicAPI, model) {
    publicAPI.setScores = (scores) => {
      model.scores = [].concat(scores);
      const scoreMapByValue = {};
      model.scores.forEach((score) => {
        scoreMapByValue[score.value] = score;
      });
      model.scoreMapByValue = scoreMapByValue;
      publicAPI.fireScoresChange(model.scores);
    };
  
    publicAPI.getScoreColor = (value) => {
      const score = model.scoreMapByValue[value];
      return score ? score.color : undefined;
    };
  
    publicAPI.getScoreName = (value) => {
      const score = model.scoreMapByValue[value];
      return score ? score.name : undefined;
    };
    publicAPI.getDefaultScore = () => {
      if (model.scores) {
        const index = model.scores.findIndex((score) => !!score.isDefault);
        return index === -1 ? 0 : index;
      }
      return 0;
    };
    publicAPI.setDefaultScore = (value) => {
      if (model.scores) {
        model.scores[publicAPI.getDefaultScore()].isDefault = false;
        model.scores[value].isDefault = true;
      }
    };
  }
docs: ---------------------------------------------------------------------------- Partition Provider ----------------------------------------------------------------------------