code: def coverage(y_true, y_pred, lower: pd.Series, upper: pd.Series):
      """Returns the percentage of actual values that are within the
      prediction interval. Higher score is better.
      NOTE: If lower and upper have NAN values, it returns np.nan
      """
      y_true = _check_series(y_true)
      y_pred = _check_series(y_pred)
      lower = _check_series(lower)
      upper = _check_series(upper)
  
      # First combine the true, upper and lower values and keep only those values
      # that match the y_true indices. Then if any of the values have NAN in them,
      # return NAN, else proceed to calculating metric.
  
      # NAN's can occur due to following reasons:
      # (1) Indices match between y_true and (lower or upper) but lower or upper
      # values have NAN (i.e. forecaster does not support prediction intervals)
      # (2) y_true is NAN (i.e. model has been finalized)
      # (3) Indices do not match up between y_true and (lower or upper) - failsafe
  
      combined = pd.concat([y_true, lower, upper], axis=1)
      combined.columns = ["y_true", "lower", "upper"]
      combined.dropna(subset=["y_true"], inplace=True)
  
      # Override lower and upper to only those indices that match y_true indices
      lower = combined["lower"]
      upper = combined["upper"]
  
      if (
          y_true.isna().any()
          or lower.isna().any()
          or upper.isna().any()
      ):
          return np.nan
  
      in_limits = np.logical_and(y_true > lower, y_true < upper)
      return sum(in_limits) / len(in_limits)
  
imports: from typing import Any, Dict, Optional, Union
  import numpy
  import pandas
  from sklearn import metrics
  from sklearn.metrics._scorer import _BaseScorer
  from sktime.performance_metrics.forecasting._functions import mean_absolute_percentage_error, mean_absolute_scaled_error, mean_squared_scaled_error
  import pycaret.internal.metrics
  from pycaret.containers.metrics.base_metric import MetricContainer
label_desc: Use image node_id 5 for calling a global function with example usage: coverage(y_true, y_pred, lower, upper) and returns: unknown, np