class_docstr: Aggregation function for a single metric.
class_docstr_tok: ["Aggregation","function","for","a","single","metric","."]
docstr: Aggregate a pair of values.
  
  :param pair: The pair of values.
  :type pair: tuple
  :returns: The aggregated values.
  :rtype: numpy.ndarray
docstr_tok: ["Aggregate","a","pair","of","values",".",":","param","pair",":","The","pair","of","values",".",":","type","pair",":","tuple",":","returns",":","The","aggregated","values",".",":","rtype",":","numpy.ndarray"]
code: def _agg_func_pair(self, pair):
      """Aggregate a pair of values.
  
      :param pair: The pair of values.
      :type pair: tuple
      :returns: The aggregated values.
      :rtype: numpy.ndarray
      """
      true_y, pred_y = zip(*pair.values.tolist())
      return self.aggfunc(true_y, pred_y)
  
imports: import logging
  import math
  import warnings
  from abc import ABC, abstractmethod
  import numpy
  import pandas
  from sklearn.metrics import multilabel_confusion_matrix
  from erroranalysis._internal.cohort_filter import filter_from_cohort
  from erroranalysis._internal.constants import DIFF, PRED_Y, ROW_INDEX, TRUE_Y, MatrixParams, MetricKeys, Metrics, ModelTask, metric_to_display_name
  from erroranalysis._internal.metrics import get_ordered_classes, is_multi_agg_metric, metric_to_func
  from raiutils.exceptions import UserConfigValidationException
label_desc: Use image node_id 2 for calling the _AggFunc obj's underlying member method code with example usage: obj._agg_func_pair(pair) and returns: self