code: def get_online_DER_stats(
      DER: float,
      CER: float,
      FA: float,
      MISS: float,
      diar_eval_count: int,
      der_stat_dict: Dict[str, float],
      deci: int = 3,
  ) -> Tuple[Dict[str, float], Dict[str, float]]:
      """
      For evaluation of online diarization performance, add cumulative, average, and maximum DER/CER.
  
      Args:
          DER (float): Diarization Error Rate from the start to the current point
          CER (float): Confusion Error Rate from the start to the current point
          FA (float): False Alarm from the start to the current point
          MISS (float): Miss rate from the start to the current point
          diar_eval_count (int): Number of evaluation sessions
          der_stat_dict (dict): Dictionary containing cumulative, average, and maximum DER/CER
          deci (int): Number of decimal places to round
  
      Returns:
          der_dict (dict): Dictionary containing DER, CER, FA, and MISS
          der_stat_dict (dict): Dictionary containing cumulative, average, and maximum DER/CER
      """
      der_dict = {
          "DER": round(100 * DER, deci),
          "CER": round(100 * CER, deci),
          "FA": round(100 * FA, deci),
          "MISS": round(100 * MISS, deci),
      }
      der_stat_dict["cum_DER"] += DER
      der_stat_dict["cum_CER"] += CER
      der_stat_dict["avg_DER"] = round(
          100 * der_stat_dict["cum_DER"] / diar_eval_count, deci
      )
      der_stat_dict["avg_CER"] = round(
          100 * der_stat_dict["cum_CER"] / diar_eval_count, deci
      )
      der_stat_dict["max_DER"] = round(
          max(der_dict["DER"], der_stat_dict["max_DER"]), deci
      )
      der_stat_dict["max_CER"] = round(
          max(der_dict["CER"], der_stat_dict["max_CER"]), deci
      )
      return der_dict, der_stat_dict
  
file_path: NeMo/nemo/collections/asr/metrics/der.py
imports: import itertools
  from itertools import permutations
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch
  from pyannote.core import Segment, Timeline
  from pyannote.metrics.diarization import DiarizationErrorRate
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.asr.parts.utils.optimization_utils import linear_sum_assignment
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: get_online_DER_stats(DER, CER, FA, MISS, diar_eval_count, der_stat_dict, deci) and returns: der_dict,  der_stat_dict