code: def _calculate_regret(
      self, y_true, y_pred_proba, metric=None, sample_weight=None
  ):  # noqa
      # Compute average score across all validation windows
      total_score = 0.0
      for window_idx, data_future in enumerate(
          self.data_future_per_window
      ):
          dummy_pred = self.dummy_pred_per_window[window_idx]
          dummy_pred[list(dummy_pred.columns)] = y_pred_proba[
              window_idx
          ]
          # We use scorer.compute_metric instead of scorer.score to avoid repeated calls to scorer.save_past_metrics
          metric_value = self.scorer_per_window[
              window_idx
          ].compute_metric(data_future, dummy_pred, target=self.target)
          total_score += metric.sign * metric_value
      avg_score = total_score / len(self.data_future_per_window)
      # score: higher is better, regret: lower is better, so we flip the sign
      return -avg_score
  
imports: import copy
  import logging
  import pprint
  from typing import Dict, List, Optional
  import numpy
  import autogluon.core
  from autogluon.common.utils.log_utils import set_logger_verbosity
  from autogluon.core.models.greedy_ensemble.ensemble_selection import EnsembleSelection
  from autogluon.timeseries import TimeSeriesDataFrame
  from autogluon.timeseries.metrics import TimeSeriesScorer
  from autogluon.timeseries.models.ensemble import AbstractTimeSeriesEnsembleModel
  from autogluon.timeseries.utils.datetime import get_seasonality
label_desc: Use image node_id 3 for calling the TimeSeriesEnsembleSelection obj's underlying member method code with example usage: obj._calculate_regret(y_true, y_pred_proba, metric, sample_weight) and returns: unknown