code: def get_accuracy(events: Sequence[Event]) -> float:
      num_correct = sum(int(event.data["correct"]) for event in events)
      num_total = len(events)
      if num_total == 0:
          return float("nan")
      else:
          return num_correct / num_total
  
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 1 for calling a global function with example usage: get_accuracy(events) and returns: float, unknown