def best_hits(max_hits, gene):
    """Selects candidates(hits) up to max_hits.
    Candidates have to be in hmm_hits

    returns: tuple with gene name and list with candidates names"""
    candidates = []
    hits = gene.hits()
    counter = 0
    if hits:
        for hit in hits:
            if counter == max_hits:
                break
            counter += 1
            if hit.in_hmm_hits() is True:
                candidates.append(hit)
    return gene.query, candidates
