code: def plot_time_series_with_change_points(
      ts_name, ts, true_cps, font_size=16
  ):
      """Plot the time series with the known change points.
  
      Parameters
      ----------
      ts_name: str
          the name of the time series (dataset) to be annotated
      ts: array-like, shape = [n]
          the univariate time series of length n to be annotated
      true_cps: array-like, dtype=int
          the known change points
          these are highlighted in the time series as vertical lines
      font_size: int
          for plotting
  
      Returns
      -------
      fig : matplotlib.figure.Figure
  
      axes : np.ndarray
          Array of the figure's Axe objects
      """
      # Checks availability of plotting libraries
      _check_soft_dependencies("matplotlib")
      import matplotlib.pyplot as plt
  
      ts = check_X(ts)
  
      fig = plt.figure(figsize=(20, 5))
      true_cps = np.sort(true_cps)
      segments = [0] + list(true_cps) + [ts.shape[0]]
  
      for idx in np.arange(0, len(segments) - 1):
          plt.plot(
              range(segments[idx], segments[idx + 1]),
              ts[segments[idx] : segments[idx + 1]],
          )
  
      lim1 = plt.ylim()[0]
      lim2 = plt.ylim()[1]
  
      ax = plt.gca()
      for i, idx in enumerate(true_cps):
          ax.vlines(
              idx, lim1, lim2, linestyles="--", label=str(i) + "-th-CPT"
          )
  
      plt.legend(loc="best")
      plt.title(ts_name, fontsize=font_size)
      return fig, ax
  
imports: import numpy
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.validation.forecasting import check_X
label_desc: Use image node_id 1 for calling a global function with example usage: plot_time_series_with_change_points(ts_name, ts, true_cps, font_size) and returns: fig,  ax