class_docstr: Choose the best model using a single cross-validation diagnostic.
  
  The input is a list of CVDiagnostics, each corresponding to one model.
  The specified diagnostic is extracted from each of the CVDiagnostics,
  its values (each of which corresponds to a separate metric) are
  aggregated with the aggregation function, the best one is determined
  with the criterion, and the index of the best diagnostic result is returned.
  
  
   Example:
  
   ::
      s = SingleDiagnosticBestModelSelector(
          diagnostic = 'Fisher exact test p',
          criterion = DiagnosticCriterion.MIN,
          metric_aggregation = MetricAggregation.MEAN,
      )
      best_diagnostic_index = s.best_diagnostic(diagnostics)
  
  Args:
       diagnostic (str): The name of the diagnostic to use, which should be
           a key in CVDiagnostic.
       metric_aggregation (MetricAggregation): Callable
          applied to the values of the diagnostic for a single model to
          produce a single number.
       criterion (DiagnosticCriterion): Callable used
          to determine which of the (aggregated) diagnostics is the best.
  
  
   Returns:
       int: index of the selected best diagnostic.
code: def __init__(
      self,
      diagnostic: str,
      metric_aggregation: MetricAggregation,
      criterion: DiagnosticCriterion,
  ) -> None:
      self.diagnostic = diagnostic
      self.metric_aggregation = metric_aggregation
      self.criterion = criterion
  
imports: from abc import ABC, abstractmethod
  from collections import defaultdict
  from enum import Enum
  from functools import partial
  from logging import Logger
  from numbers import Number
  from typing import Any, Callable, Dict, Iterable, List, NamedTuple, Optional, Set, Tuple
  import numpy
  from ax.core.observation import Observation, ObservationData
  from ax.core.optimization_config import OptimizationConfig
  from ax.modelbridge.base import ModelBridge
  from ax.utils.common.logger import get_logger
  from ax.utils.stats.model_fit_stats import _correlation_coefficient, _fisher_exact_test_p, _log_likelihood, _mape, _mean_prediction_ci, _rank_correlation, _total_raw_effect, _wmape, compute_model_fit_metrics
label_desc: Use image node_id 1 to create a new SingleDiagnosticBestModelSelector object from inherited base classes: BestModelSelector with example: obj = SingleDiagnosticBestModelSelector(diagnostic, metric_aggregation, criterion)