code: def compute_averaged_f_score(
      confusion_matrix: np.ndarray,
      beta: float = 1.0,
      average: str = "macro",
  ) -> float:
      assert average in ["macro"]
      f_scores = []
      for i in range(confusion_matrix.shape[0]):
          f_scores.append(
              compute_f_score(confusion_matrix, idx=i, beta=beta)
          )
      return np.array(f_scores).mean()
  
file_path: evals/evals/metrics.py
imports: import random
  from typing import Optional, Sequence, Set
  import numpy
  from evals.record import Event
label_desc: Use image node_id 8 for calling a global function with example usage: compute_averaged_f_score(confusion_matrix, beta, average) and returns: np