code: def plot(
      self,
      new_plot: bool = False,
      show_series: bool = False,
      show_cost: bool = True,
      cost_cmap: str = "summer",
      args_path: dict = {},
      args_cost: dict = {},
      args_series1: dict = {},
      args_series2: dict = {},
  ):
      """
      Plot the warp path.
  
      Parameters
      ----------
      new_plot
          Boolean value indicating whether to spawn a new figure.
      show_series
          Boolean value indicating whether to additionally plot the two time series.
          Series1 will be plotted below the cost matrix and series2 to the left of the cost matrix.
      show_cost
          Boolean value indicating whether to additionally plot the cost matrix.
          Cost Matrix will be displayed as a heatmap.
          Useful for visualizing the effect of the window function.
      cost_cmap
          Colormap style for cost matrix plot
      args_path
          Some keyword arguments to pass to `plot()` function for warp path
      args_cost
          Some keyword arguments to pass to `imshow` function for cost matrix
      args_series1
          Some keyword arguments to pass to `plot()` method for series1
      args_series2
          Some keyword arguments to pass to `plot()` method for series2
      """
  
      if new_plot:
          fig = plt.figure()
      else:
          fig = plt.gcf()
  
      if show_series:
          gs = fig.add_gridspec(
              2, 2, width_ratios=[0.4, 0.6], height_ratios=[0.6, 0.4]
          )
  
          warp = fig.add_subplot(gs[0, 1])
          left = fig.add_subplot(gs[0, 0])
          bottom = fig.add_subplot(gs[1, 1])
  
      else:
          warp = plt.gca()
  
      warp.title.set_text("Cost Matrix")
      warp.set_xlim([0, self.n])
      warp.set_ylim([0, self.m])
      warp.yaxis.set_major_locator(plt.MaxNLocator(integer=True))
  
      if show_cost:
          cost_matrix = self.cost.to_dense()
          cost_matrix = np.transpose(cost_matrix[1:, 1:])
          warp.imshow(
              cost_matrix,
              cmap=cost_cmap,
              interpolation="none",
              origin="lower",
              extent=[0, self.n, 0, self.m],
              **args_cost,
          )
  
      show_path = True
      if show_path:
          path = self.path()
  
          i_coords = path[:, 0] + 0.5
          j_coords = path[:, 1] + 0.5
          warp.plot(i_coords, j_coords, **args_path)
  
      if show_series:
          self.series1.plot(ax=bottom, **args_series1)
          self.series2.plot(
              ax=left, y=self.series2._time_dim, **args_series2
          )
  
          bottom.set_xlim(
              [self.series1.start_time(), self.series1.end_time()]
          )
          left.set_ylim(
              [self.series2.start_time(), self.series2.end_time()]
          )
  
          bottom.legend()
          bottom.set_title("")
          left.legend()
          left.set_title("")
  
      warp.set_aspect("auto")
  
imports: from typing import Tuple, Union
  import numpy
  import xarray
  from matplotlib import pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: plot(new_plot, show_series, show_cost, cost_cmap, args_path, args_cost, args_series1, args_series2) without return types