code: def plot_forecast_supportset_attention(
      query_past: List[np.ndarray],
      query_future: List[np.ndarray],
      pred: List[np.ndarray],
      supps: List[np.ndarray],
      attention: List[np.ndarray],
      quantiles: List[str],
  ) -> plt.Figure:
      """
      Plots the provided forecasts for each sample with confidence intervals using all provided quantiles.
      Furthermore, plots the time series in the support set of this sample aligned with their attention scores.
  
      Parameters
      ----------
      query_past: List[np.ndarray] of length n_samples, each array has shape [context length]
          The past query which the model uses to make a prediction.
      query_future: List[np.ndarray] of length n_samples, each array has shape [prediction horizon length]
          The ground truth for the forecast.
      pred: List[np.ndarray], of length n_samples, each array has shape  [prediction horizon length, n_quantiles]
          The prediction of the model.
      supps: List[np.ndarray], length is n_samples, each item has shape[supps_size, support ts length]
          The support sets for each query.
      attention: List[np.ndarray], length is n_samples, each item has shape[supps_size, support ts length]
          The attention scores for each support set times series.
      quantiles: List[float], shape[n_quantiles,]
  
      Returns
      -------
      plt.figure.Figure
          A plot containing one subplot for each sample. Each subplot displays the ground truth, predicted confidence
          intervals, the predicted median. Furthermore, the time series in the support set aligned with their attention
          scores.
      """
      supps_size = len(supps[0])
      n_samples = len(query_past)
      plots_per_sample = supps_size + 1
      n_plots = plots_per_sample * n_samples
      fig, subs = plt.subplots(n_plots, figsize=(10, 4 * n_plots))
      for i in range(n_samples):
          # plot prediction
          subs[plots_per_sample * i].set_title(f"query {i}")
          _plot_quantile_forecast(
              subs[plots_per_sample * i],
              query_past[i],
              query_future[i],
              pred[i],
              quantiles,
          )
          # plot support ts and attention weights
          for j in range(1, supps_size + 1):
              subs[plots_per_sample * i + j].set_title(
                  f"support ts {j} for query {i}"
              )
              subs[plots_per_sample * i + j].plot(
                  supps[i][j - 1].squeeze()
              )
  
              subs[plots_per_sample * i + j].sharex(
                  subs[plots_per_sample * i]
              )
              subs[plots_per_sample * i + j].sharey(
                  subs[plots_per_sample * i]
              )
              # twin object for two different y-axis on the sample plot
              ax2 = subs[plots_per_sample * i + j].twinx()
              for head in range(attention[0][0].shape[1]):
                  n_att = len(attention[i][j - 1][:, head])
                  n_supps = len(supps[i][j - 1])
                  ax2.fill_between(
                      np.linspace(start=0, stop=n_supps, num=n_att),
                      attention[i][j - 1][:, head],
                      alpha=0.25,
                      # label=f"head {head}",
                      label="accumulated attention",
                  )
              if j == 1:
                  ax_base = ax2
              else:
                  ax2.sharey(ax_base)
              ax2.set_ylabel("attention scores", color="red")
              ax2.legend()
      return fig
  
imports: from typing import List
  import numpy
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: plot_forecast_supportset_attention(query_past, query_future, pred, supps, attention, quantiles) and returns: fig