code: def _select_better_fit(self, matching_venvs):
          
          # keep the venvs in a separate array, to pick up the winner, and the (sorted, to compare
          # each dependency with its equivalent) in other structure to later compare
          venvs = []
          to_compare = []
          for matching, venv in matching_venvs:
              to_compare.append(sorted(matching, key=lambda req: getattr(req, 'key', '')))
              venvs.append(venv)
  
          # compare each n-tuple of dependencies to see which one is bigger, and add score to the
          # position of the winner
          scores = [0] * len(venvs)
          for dependencies in zip(*to_compare):
              if not isinstance(dependencies[0], Distribution):
                  # only distribution URLs can be compared
                  continue
  
              winner = dependencies.index(max(dependencies))
              scores[winner] = scores[winner] + 1
  
          # get the rightmost winner (in case of ties, to select the latest venv)
          winner_pos = None
          winner_score = -1
          for i, score in enumerate(scores):
              if score >= winner_score:
                  winner_score = score
                  winner_pos = i
          return venvs[winner_pos]
docs: Receive a list of matching venvs, and decide which one is the best fit.