def get_best_indexes(logits, n_best_size):
  """Gets the indices of the n-best logits from a list."""
  indices = sorted(range(len(logits)), key=logits.__getitem__, reverse=True)
  return indices[:n_best_size]