code: def _dtw_classic(
      x=None,
      y=None,
      dist="square",
      precomputed_cost=None,
      return_cost=False,
      return_accumulated=False,
      return_path=False,
  ):
      """Classic Dynamic Time Warping (DTW) distance between two time series.
  
      The classic version of DTW has no constraint region, allowing for possibly
      very large time shifts. This can be an upside or a downside depending on
      the application. If you do not want to allow large time shifts,
      consider using another method with a constraint region.
  
      Options
      -------
      This method has no options.
  
      References
      ----------
      .. [1] H. Sakoe and S. Chiba, "Dynamic programming algorithm optimization
             for spoken word recognition". IEEE Transactions on Acoustics,
             Speech, and Signal Processing, 26(1), 43-49 (1978).
  
      """
      (
          x,
          y,
          precomputed_cost,
          n_timestamps_1,
          n_timestamps_2,
      ) = _check_input_dtw(
          x, y, precomputed_cost, dist, method="classic"
      )
      cost_mat = _input_to_cost(
          x, y, dist, precomputed_cost, region=None
      )
      acc_cost_mat = accumulated_cost_matrix(cost_mat, region=None)
      dtw_dist = acc_cost_mat[-1, -1]
      if dist == "square":
          dtw_dist = sqrt(dtw_dist)
  
      res = _return_results(
          dtw_dist,
          cost_mat,
          acc_cost_mat,
          return_cost,
          return_accumulated,
          return_path,
      )
      return res
  
imports: import numpy
  from math import ceil, log2, sqrt
  from numba import njit, prange
  from sklearn.utils import check_array
label_desc: Use image node_id 15 for calling a global function with example usage: _dtw_classic(x, y, dist, precomputed_cost, return_cost, return_accumulated, return_path) and returns: res