code: def get_difficulty(events: Sequence[Event]) -> float:
      """
      Calculates average difficulty of all questions answered correctly
      """
      events = [i for i in events if i.data["correct"] is True]
      num_correct = sum(event.data["difficulty"] for event in events)
      num_total = len(events)
      if num_total == 0:
          return float("nan")
      else:
          return num_correct / num_total
  
imports: from typing import Any, Sequence
  import evals
  from evals.record import Event
label_desc: Use image node_id 3 for calling a global function with example usage: get_difficulty(events) and returns: float, unknown