def _get_best_indexes(logits, n_best_size):
index_and_score = sorted(<EOL>enumerate(logits), key=lambda x: x[<NUM_LIT:1>], reverse=True)<EOL>best_indexes = []<EOL>for i, _ in enumerate(index_and_score):<EOL><INDENT>if i >= n_best_size:<EOL><INDENT>break<EOL><DEDENT>best_indexes.append(index_and_score[i][<NUM_LIT:0>])<EOL><DEDENT>return best_indexes<EOL>
Get the n-best logits from a list.