'Download the best matching subtitles.
:param subtitles: the subtitles to use.
:type subtitles: list of :class:`~subliminal.subtitle.Subtitle`
:param video: video to download subtitles for.
:type video: :class:`~subliminal.video.Video`
:param languages: languages to download.
:type languages: set of :class:`~babelfish.language.Language`
:param int min_score: minimum score for a subtitle to be downloaded.
:param bool hearing_impaired: hearing impaired preference.
:param bool only_one: download only one subtitle, not one per language.
:param compute_score: function that takes `subtitle` and `video` as positional arguments,
`hearing_impaired` as keyword argument and returns the score.
:return: downloaded subtitles.
:rtype: list of :class:`~subliminal.subtitle.Subtitle`'

def download_best_subtitles(self, subtitles, video, languages, min_score=0, hearing_impaired=False, only_one=False, compute_score=None):

    compute_score = (compute_score or default_compute_score)
    scored_subtitles = sorted([(s, compute_score(s, video, hearing_impaired=hearing_impaired)) for s in subtitles], key=operator.itemgetter(1), reverse=True)
    downloaded_subtitles = []
    for (subtitle, score) in scored_subtitles:
        if (score < min_score):
            logger.info('Score    %d    is    below    min_score    (%d)', score, min_score)
            break
        if (subtitle.language in set((s.language for s in downloaded_subtitles))):
            logger.debug('Skipping    subtitle:    %r    already    downloaded', subtitle.language)
            continue
        if self.download_subtitle(subtitle):
            downloaded_subtitles.append(subtitle)
        if (set((s.language for s in downloaded_subtitles)) == languages):
            logger.debug('All    languages    downloaded')
            break
        if only_one:
            logger.debug('Only    one    subtitle    downloaded')
            break
    return downloaded_subtitles
