code: def plot_prediction_intervals(
      model_forecast: np.array,
      up_int: np.array,
      low_int: np.array,
      ts: np.array,
      show_history: bool,
      ts_test: np.array,
      show_forecast: bool,
      labels: str,
      figwidth: float = 15,
      figheight: float = 7,
  ):
      """Function for plotting prediction intervals.
  
      Args:
          model_forecast: forecast of the given Fedot class object
          up_int: upper prediction interval
          low_int: low prediction interval
          ts: initial time series
          show_history: flag whether to plot initial time series
          ts_test: test time series if given
          show_forecast: flag wheter to plot forecast of the given Fedot class object
          labels: which type of labels (prediction intervals or base quantiles) use for plotting.
      """
      if ts_test is not None:
          if len(ts_test) != len(model_forecast):
              raise ValueError(
                  "Lengths of test series and forecasting horizon are different. Correct test series."
              )
  
      train_len = len(ts)
      train_range = range(train_len)
      test_len = len(model_forecast)
      test_range = range(train_len, train_len + test_len)
  
      fig, ax = plt.subplots()
      fig.set(figwidth=figwidth, figheight=figheight)
  
      if labels == "pred_ints":
          label = "PredictionIntervals"
      elif labels == "base_quantiles":
          label = "Base quantiles"
  
      if ts_test is not None:
          ax.plot(test_range, ts_test, color="black", label="Actual TS")
      if show_forecast:
          ax.plot(
              test_range, model_forecast, color="red", label="Forecast"
          )
      ax.fill_between(
          test_range,
          low_int,
          up_int,
          alpha=0.2,
          color="red",
          label=label,
      )
  
      plt.legend()
      plt.grid()
      plt.show()
  
      if show_history:
          fig1, ax1 = plt.subplots()
          fig1.set(figwidth=figwidth, figheight=figheight)
          ax1.plot(
              train_range,
              ts,
              color="black",
              alpha=0.5,
              label="Train TS",
          )
  
          if ts_test is not None:
              ax1.plot(
                  test_range, ts_test, color="black", label="Actual TS"
              )
          if show_forecast:
              ax1.plot(
                  test_range,
                  model_forecast,
                  color="red",
                  label="Forecast",
              )
          ax1.fill_between(
              test_range,
              low_int,
              up_int,
              alpha=0.2,
              color="red",
              label=label,
          )
  
      plt.legend()
      plt.grid()
      plt.show()
  
label_desc: Use image node_id 1 for calling a global function with example usage: plot_prediction_intervals(model_forecast, up_int, low_int, ts, show_history, ts_test, show_forecast, labels, figwidth, figheight) without return types