code: def plot_trajectory(ts, ax, color_code=None, alpha=1.0):
      if color_code is not None:
          colors = [color_code] * len(ts)
      else:
          colors = plt.cm.jet(np.linspace(0, 1, len(ts)))
      for i in range(len(ts) - 1):
          ax.plot(
              ts[i : i + 2, 0],
              ts[i : i + 2, 1],
              marker="o",
              c=colors[i],
              alpha=alpha,
          )
  
imports: import matplotlib.pyplot
  import numpy
  from tslearn.metrics import dtw_path, ctw_path
label_desc: Use image node_id 1 for calling a global function with example usage: plot_trajectory(ts, ax, color_code, alpha) without return types