class_docstr: Empirical coverage percentage for interval predictions.
  
  Parameters
  ----------
  multioutput : string "uniform_average" or "raw_values" determines how        multioutput results will be treated.
  
  score_average : bool, optional, default = True
      specifies whether scores for each quantile should be averaged.
class_docstr_tok: ["Empirical","coverage","percentage","for","interval","predictions",".","Parameters","--","--","--","--","--","multioutput",":","string","``","uniform_average","''","or","``","raw_values","''","determines","how","multioutput","results","will","be","treated",".","score_average",":","bool",",","optional",",","default","=","True","specifies","whether","scores","for","each","quantile","should","be","averaged","."]
docstr: Logic for finding the metric evaluated at each index.
  
  y_true : pd.Series, pd.DataFrame or np.array of shape (fh,) or             (fh, n_outputs) where fh is the forecasting horizon
      Ground truth (correct) target values.
  
  y_pred : pd.Series, pd.DataFrame or np.array of shape (fh,) or              (fh, n_outputs)  where fh is the forecasting horizon
      Forecasted values.
  
  multioutput : string "uniform_average" or "raw_values" determines how             multioutput results will be treated.
docstr_tok: ["Logic","for","finding","the","metric","evaluated","at","each","index",".","y_true",":","pd.Series",",","pd.DataFrame","or","np.array","of","shape","(","fh",",",")","or","(","fh",",","n_outputs",")","where","fh","is","the","forecasting","horizon","Ground","truth","(","correct",")","target","values",".","y_pred",":","pd.Series",",","pd.DataFrame","or","np.array","of","shape","(","fh",",",")","or","(","fh",",","n_outputs",")","where","fh","is","the","forecasting","horizon","Forecasted","values",".","multioutput",":","string","``","uniform_average","''","or","``","raw_values","''","determines","how","multioutput","results","will","be","treated","."]
code: def _evaluate_by_index(self, y_true, y_pred, multioutput, **kwargs):
      """Logic for finding the metric evaluated at each index.
  
          y_true : pd.Series, pd.DataFrame or np.array of shape (fh,) or \
              (fh, n_outputs) where fh is the forecasting horizon
              Ground truth (correct) target values.
  
          y_pred : pd.Series, pd.DataFrame or np.array of shape (fh,) or  \
              (fh, n_outputs)  where fh is the forecasting horizon
              Forecasted values.
  
          multioutput : string "uniform_average" or "raw_values" determines how \
              multioutput results will be treated.
          """
      lower = y_pred.iloc[
          :, y_pred.columns.get_level_values(2) == "lower"
      ].to_numpy()
      upper = y_pred.iloc[
          :, y_pred.columns.get_level_values(2) == "upper"
      ].to_numpy()
  
      if not isinstance(y_true, np.ndarray):
          y_true_np = y_true.to_numpy()
      else:
          y_true_np = y_true
      if y_true_np.ndim == 1:
          y_true_np = y_true.reshape(-1, 1)
  
      scores = np.unique(
          np.round(y_pred.columns.get_level_values(1), 7)
      )
      no_scores = len(scores)
      vars = np.unique(y_pred.columns.get_level_values(0))
  
      y_true_np = np.tile(y_true_np, no_scores)
  
      truth_array = (y_true_np > lower).astype(int) * (
          y_true_np < upper
      ).astype(int)
  
      out_df = pd.DataFrame(
          truth_array,
          columns=pd.MultiIndex.from_product([vars, scores]),
      )
  
      return out_df
  
imports: from logging import warning
  import numpy
  import pandas
  from pandas.api.types import is_numeric_dtype
  from sklearn.utils import check_array, check_consistent_length
  from sktime.datatypes import check_is_scitype, convert, convert_to
  from sktime.performance_metrics.forecasting._classes import BaseForecastingErrorMetric
  from sktime.performance_metrics.forecasting._coerce import _coerce_to_scalar
label_desc: Use image node_id 2 for calling the EmpiricalCoverage obj's underlying member method code with example usage: obj._evaluate_by_index(y_true, y_pred, multioutput) and returns: out_df