code: def plot_nonconformity_scores(scores, alpha, q, method):
      """Plot the nonconformity scores as well as the one-sided interval width (q).
  
      Parameters
      ----------
          scores : dict
              nonconformity scores
          alpha : float or tuple
                  user-specified significance level of the prediction interval, float if coverage error spread arbitrarily
                  over left and right tails, tuple of two floats for different coverage error over left and right tails
                  respectively
          q : float or list
              prediction interval width (or q)
          method : str
              name of conformal prediction technique used
  
              Options
                  * (default) ``naive``: Naive or Absolute Residual
                  * ``cqr``: Conformalized Quantile Regression
  
      Returns
      -------
          matplotlib.pyplot.figure
              Figure showing the nonconformity score with horizontal line for q-value based on the significance level or
              alpha
      """
      if not isinstance(q, list):
          q_sym = q
          scores = scores["noncon_scores"]
          confidence_levels = np.arange(len(scores)) / len(scores)
          fig, ax = plt.subplots()
          ax.plot(confidence_levels, scores, label="score")
          ax.axvline(
              x=1 - alpha,
              color="g",
              linestyle="-",
              label=f"(1-alpha) = {1 - alpha}",
              linewidth=1,
          )
          ax.axhline(
              y=q,
              color="r",
              linestyle="-",
              label=f"q1 = {round(q_sym, 2)}",
              linewidth=1,
          )
      else:
          q_lo, q_hi = q
          scores_lo = scores["noncon_scores_lo"]
          scores_hi = scores["noncon_scores_hi"]
          alpha_lo, alpha_hi = alpha
          confidence_levels = np.arange(len(scores_lo)) / len(scores_lo)
          fig, ax = plt.subplots()
          ax.plot(confidence_levels, scores_lo, label="lower score")
          ax.plot(confidence_levels, scores_hi, label="upper score")
          ax.axvline(
              x=1 - alpha_lo,
              color="darkgreen",
              linestyle="-",
              label=f"(1-alpha_lo) = {round(1.0-alpha_lo, 10)}",
              linewidth=1,
          )
          ax.axvline(
              x=1 - alpha_hi,
              color="lightgreen",
              linestyle="-",
              label=f"(1-alpha_hi) = {round(1.0-alpha_hi, 10)}",
              linewidth=1,
          )
          ax.axhline(
              y=q_lo,
              color="darkred",
              linestyle="-",
              label=f"q1 = {round(q_lo, 2)}",
              linewidth=1,
          )
          ax.axhline(
              y=q_hi,
              color="red",
              linestyle="-",
              label=f"q2 = {round(q_hi, 2)}",
              linewidth=1,
          )
      ax.set_title(f"{method} One-Sided Interval Width with q")
      ax.set_xlabel("Confidence Level")
      ax.set_ylabel("One-Sided Interval Width")
      ax.legend()
      return fig
  
file_path: neural_prophet/neuralprophet/plot_forecast_matplotlib.py
imports: import logging
  import numpy
  from neuralprophet.plot_model_parameters_matplotlib import plot_custom_season, plot_daily, plot_weekly, plot_yearly
  from neuralprophet.plot_utils import set_y_as_percent
label_desc: Use image node_id 5 for calling a global function with example usage: plot_nonconformity_scores(scores, alpha, q, method) and returns: fig