class_docstr: The ensemble analyzer allows for evaluating the performance of ensembles
  across datasets.
  
  The analysis is run in parallel and should, thus, not be used in a Jupyter
  notebook. Instead, consider using the `tsbench` CLI.
code: def _performance_on_dataset(
      self,
      X_test: List[Config[ModelConfig]],
      y_test: List[Performance],
  ) -> Tuple[Performance, List[ModelConfig]]:
      # If there are model constraints, we restrict the test set
      if self.config_class is not None:
          indices = [
              i
              for i, c in enumerate(X_test)
              if isinstance(c.model, self.config_class)
              and (
                  not isinstance(c.model, TrainConfig)
                  or c.model.training_fraction == 1
              )
          ]
          X_test = [X_test[i] for i in indices]
          y_test = [y_test[i] for i in indices]
  
      # After that, we sort by the validation or test nCRPS and pick the ensemble members
      val_scores = [
          self.tracker.get_validation_scores(x) for x in X_test
      ]
      if any(x is None for x in val_scores):
          order = np.argsort([p.ncrps.mean for p in y_test]).tolist()
      else:
          order = np.argsort([s.ncrps for s in val_scores])  # type: ignore
      choices = order[: (self.ensemble_size or len(order))]
  
      # In case no model is selected, seasonal naïve is selected (this should always be
      # fast enough to satisfy the latency constraint unless our measurement is faulty or
      # the implementation inefficient)
      if len(choices) == 0:
          choices = [
              i
              for i, c in enumerate(X_test)
              if isinstance(c.model, SeasonalNaiveModelConfig)
          ]
  
      # Eventually, we get the ensemble members and compute the ensemble performance
      members = [X_test[i].model for i in choices]
      performance = self.get_ensemble_performance(
          members,
          dataset=X_test[0].dataset,
          member_performances=[y_test[i] for i in choices],
      )
  
      return performance, members
  
imports: import itertools
  import math
  import random
  from pathlib import Path
  from typing import Callable, Dict, List, Optional, Tuple, Type
  import numpy
  import pandas
  from tqdm.auto import tqdm
  from tsbench.analysis.utils import loocv_split, num_fitting_processes, run_parallel
  from tsbench.config import Config, DATASET_REGISTRY, DatasetConfig, ModelConfig, TrainConfig
  from tsbench.config.model.models import SeasonalNaiveModelConfig
  from tsbench.constants import DEFAULT_DATA_PATH
  from tsbench.evaluations.metrics.performance import Metric, Performance
  from tsbench.evaluations.tracking import ModelTracker
  from tsbench.forecasts import ensemble_forecasts, EnsembleWeighting, evaluate_forecasts, Evaluation
label_desc: Use image node_id 4 for calling the EnsembleAnalyzer obj's underlying member method code with example usage: obj._performance_on_dataset(X_test, y_test) and returns: performance,  members