code: def plot_partial(time_series, t, y_true=0, y_pred=0, color="k"):
      plt.plot(time_series[: t + 1].ravel(), color=color, linewidth=1.5)
      plt.plot(
          numpy.arange(t + 1, time_series.shape[0]),
          time_series[t + 1 :].ravel(),
          linestyle="dashed",
          color=color,
          linewidth=1.5,
      )
      plt.axvline(x=t, color=color, linewidth=1.5)
      plt.text(
          x=t - 20, y=time_series.max() - 0.25, s="Prediction time"
      )
      plt.title(
          "Sample of class {} predicted as class {}".format(
              y_true, y_pred
          )
      )
      plt.xlim(0, time_series.shape[0] - 1)
  
imports: import numpy
  import matplotlib.pyplot
  from tslearn.preprocessing import TimeSeriesScalerMeanVariance
  from tslearn.early_classification import NonMyopicEarlyClassifier
  from tslearn.datasets import UCR_UEA_datasets
label_desc: Use image node_id 1 for calling a global function with example usage: plot_partial(time_series, t, y_true, y_pred, color) without return types