code: def plot_cluster_algorithm(
      model: TimeSeriesLloyds, X: TimeSeriesInstances, k: int
  ):
      """Plot the results from a univariate partitioning algorithm.
  
      Parameters
      ----------
      model: BaseClusterer
          Clustering model to plot
      predict_series: np.ndarray or pd.Dataframe or List[pd.Dataframe]
          The series to predict the values for
      k: int
          Number of centers
      """
      _check_soft_dependencies("matplotlib")
      import matplotlib.patches as mpatches
      import matplotlib.pyplot as plt
  
      predict_series = X
      if isinstance(X, pd.DataFrame):
          predict_series = convert_to(X, "numpy3D")
      plt.figure(figsize=(5, 10))
      plt.rcParams["figure.dpi"] = 100
      indexes = model.predict(predict_series)
  
      centers = model.cluster_centers_
      series_values = _get_cluster_values(indexes, predict_series, k)
  
      fig, axes = plt.subplots(nrows=k, ncols=1)
      for i in range(k):
          _plot(series_values[i], centers[i], axes[i])
  
      blue_patch = mpatches.Patch(
          color="blue", label="Series that belong to the cluster"
      )
      red_patch = mpatches.Patch(color="red", label="Cluster centers")
      plt.legend(
          handles=[red_patch, blue_patch],
          loc="upper center",
          bbox_to_anchor=(0.5, -0.40),
          fancybox=True,
          shadow=True,
          ncol=5,
      )
      plt.tight_layout()
      plt.show()
  
file_path: sktime/sktime/clustering/utils/plotting/_plot_partitions.py
imports: import numpy
  import pandas
  from sktime.clustering.base import TimeSeriesInstances
  from sktime.clustering.partitioning import TimeSeriesLloyds
  from sktime.datatypes import convert_to
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 4 for calling a global function with example usage: plot_cluster_algorithm(model, X, k) without return types