code: def cydist_sax(sax1, sax2, breakpoints, original_size):
      """Compute distance between SAX representations as defined in [1]_.
  
      Parameters
      ----------
      sax1 : array-like, shape=(sz, d), dtype=float64 (Linux and MacOS) or float32 (Windows)
          SAX representation of a time series.
      sax2 : array-like, shape=(sz, d), dtype=float64 (Linux and MacOS) or float32 (Windows)
          SAX representation of another time series.
      breakpoints : array-like, ndim=1, dtype=float64
          The breakpoints used to assign the alphabet symbols.
      original_size : int64 (Linux and MacOS) or int32 (Windows)
          Length of the original time series.
  
      Returns
      -------
      dist_sax : float64
          SAX distance.
  
      References
      ----------
      .. [1] J. Lin, E. Keogh, L. Wei, et al. Experiencing SAX: a novel
         symbolic representation of time series.
         Data Mining and Knowledge Discovery, 2007. vol. 15(107)
      """
      assert sax1.shape == sax2.shape
      s = 0.0
      sz, d = sax1.shape
      for t in prange(sz):
          for di in range(d):
              if np.abs(sax1[t, di] - sax2[t, di]) > 1:
                  max_symbol = max(sax1[t, di], sax2[t, di])
                  min_symbol = min(sax1[t, di], sax2[t, di])
                  s += (
                      breakpoints[max_symbol - 1]
                      - breakpoints[min_symbol]
                  ) ** 2
      dist_sax = np.sqrt(s * float(original_size) / sz)
  
      return dist_sax
  
file_path: tslearn/tslearn/metrics/cysax.py
imports: import numpy
  from numba import njit, objmode, prange
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 2 for calling a global function with example usage: cydist_sax(sax1, sax2, breakpoints, original_size) and returns: dist_sax