code: def coverage(df, w):
      """Coverage
  
      Parameters
      ----------
      df: Cross-validation results dataframe.
      w: Aggregation window size.
  
      Returns
      -------
      Dataframe with columns horizon and coverage.
      """
      is_covered = (df["y"] >= df["yhat_lower"]) & (
          df["y"] <= df["yhat_upper"]
      )
      if w < 0:
          return pd.DataFrame(
              {"horizon": df["horizon"], "coverage": is_covered}
          )
      return rolling_mean_by_h(
          x=is_covered.values,
          h=df["horizon"].values,
          w=w,
          name="coverage",
      )
  
imports: from __future__ import absolute_import, division, print_function
  import logging
  from tqdm.auto import tqdm
  from copy import deepcopy
  import concurrent.futures
  import numpy
  import pandas
label_desc: Use image node_id 14 for calling a global function with example usage: coverage(df, w) and returns: rolling_mean_by_h, pd