def _score_seeds(seeds_to_rows, seeds,
                   row_score_fn):
    """Helper to score a single bootstrap sample."""
    scores = []
    for s in seeds:
      ii = seeds_to_rows[s]
      seed_scores = [row_score_fn(i) for i in ii]
      scores.append(np.mean(seed_scores))  # mean over finetuning params, etc.
    return np.mean(scores)  # mean over seeds
Helper to score a single bootstrap sample.
language/multiberts/multibootstrap.py