docs: def vote_least_worst(candidates, votes, n_winners):
      """Select "least worst" artifact as the winner of the vote.
  
      Least worst artifact is the artifact with the best worst evaluation, i.e.
      its worst evaluation is the best among all of the artifacts.
  
      Ties are resolved randomly.
  
      :param candidates: All candidates in the vote
      :param votes: Votes from the agents
      :param int n_winners: The number of vote winners
      """
      worsts = {str(c): 100000000.0 for c in candidates}
      for v in votes:
          for e in v:
              if worsts[str(e[0])] > e[1]:
                  worsts[str(e[0])] = e[1]
      s = sorted(worsts.items(), key=lambda x: x[1], reverse=True)
      best = s[:min(n_winners, len(candidates))]
      d = []
      for e in best:
          for c in candidates:
              if str(c) == e[0]:
                  d.append((c, e[1]))
      return d