class_docstr: Controller control the sample-score flow in the 1st phase.
  It records the results in the history.
class_docstr_tok: ["Controller","control","the","sample-score","flow","in","the","1st","phase",".","It","records","the","results","in","the","history","."]
docstr: :param model_id:
  :param alg_score: {alg_name1: score1, alg_name2: score2}
docstr_tok: [":","param","model_id",":",":","param","alg_score",":","{","alg_name1",":","score1",",","alg_name2",":","score2","}"]
code: def _use_vote_rank_as_final_res(self, model_id: str, alg_score: dict):
      """
      :param model_id:
      :param alg_score: {alg_name1: score1, alg_name2: score2}
      """
      # todo: bug: only all scores' under all arg is greater than previous one, then treat it as greater.
      for alg in alg_score:
          if alg not in self.history:
              self.history[alg] = []
  
      # add model and score to local list
      for alg, score in alg_score.items():
          binary_insert_get_rank(
              self.history[alg], ModelScore(model_id, score)
          )
  
      new_rank_score = self._re_rank_model_id(model_id, alg_score)
      return new_rank_score
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/src/controller/controler.py
imports: import time
  from src.controller.core.sample import Sampler
  from src.third_pkg.models import CellStructure
label_desc: Use image node_id 4 for calling the SampleController obj's underlying member method code with example usage: obj._use_vote_rank_as_final_res(model_id, alg_score) and returns: new_rank_score