code: def test_disaggregated_scores_are_determinstic():
      no_aggregation = calculate_rouge(
          PRED,
          TGT,
          bootstrap_aggregation=False,
          rouge_keys=["rouge2", "rougeL"],
      )
      assert isinstance(no_aggregation, defaultdict)
      no_aggregation_just_r2 = calculate_rouge(
          PRED, TGT, bootstrap_aggregation=False, rouge_keys=["rouge2"]
      )
      assert (
          pd.DataFrame(no_aggregation["rouge2"]).fmeasure.mean()
          == pd.DataFrame(
              no_aggregation_just_r2["rouge2"]
          ).fmeasure.mean()
      )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/examples/legacy/seq2seq/old_test_calculate_rouge.py
imports: from collections import defaultdict
  from pathlib import Path
  import pandas
  from rouge_cli import calculate_rouge_path
  from utils import calculate_rouge
label_desc: Use image node_id 1 for calling a global function with example usage: test_disaggregated_scores_are_determinstic() without return types