code: def lcss_path(
      s1,
      s2,
      eps=1,
      global_constraint=None,
      sakoe_chiba_radius=None,
      itakura_max_slope=None,
      be=None,
  ):
      r"""Compute the Longest Common Subsequence (LCSS) similarity measure
      between (possibly multidimensional) time series and return both the
      path and the similarity.
  
      LCSS is computed by matching indexes that are met up until the eps
      threshold, so it leaves some points unmatched and focuses on the
      similar parts of two sequences. The matching can occur even if the
      time indexes are different, which can be regulated through the sakoe
      chiba radius parameter that defines how far it can go.
  
      To retrieve a meaningful similarity value from the length of the
      longest common subsequence, the percentage of that value regarding
      the length of the shortest time series is returned.
  
      According to this definition, the values returned by LCSS range from
      0 to 1, the highest value taken when two time series fully match,
      and vice-versa. It is not required that both time series share the
      same size, but they must be the same dimension. LCSS was originally
      presented in [1]_ and is discussed in more details in our
      :ref:`dedicated user-guide page <lcss>`.
  
      Note
      ----
      Contrary to Dynamic Time Warping and variants, an LCSS path does not need to be contiguous.
  
      Parameters
      ----------
      s1 : array-like, shape=(sz1, d) or (sz1,)
          A time series. If shape is (sz1,), the time series is assumed to be univariate.
      s2 : array-like, shape=(sz2, d) or (sz2,)
          Another time series. If shape is (sz2,), the time series is assumed to be univariate.
      eps : float (default: 1.)
          Maximum matching distance threshold.
      global_constraint : {"itakura", "sakoe_chiba"} or None (default: None)
         Global constraint to restrict admissible paths for LCSS.
      sakoe_chiba_radius : int or None (default: None)
         Radius to be used for Sakoe-Chiba band global constraint.
         If None and `global_constraint` is set to "sakoe_chiba", a radius of
         1 is used.
         If both `sakoe_chiba_radius` and `itakura_max_slope` are set,
         `global_constraint` is used to infer which constraint to use among the
         two. In this case, if `global_constraint` corresponds to no global
         constraint, a `RuntimeWarning` is raised and no global constraint is
         used.
      itakura_max_slope : float or None (default: None)
         Maximum slope for the Itakura parallelogram constraint.
         If None and `global_constraint` is set to "itakura", a maximum slope
         of 2. is used.
         If both `sakoe_chiba_radius` and `itakura_max_slope` are set,
         `global_constraint` is used to infer which constraint to use among the
         two. In this case, if `global_constraint` corresponds to no global
         constraint, a `RuntimeWarning` is raised and no global constraint is
         used.
      be : Backend object or string or None
          Backend. If `be` is an instance of the class `NumPyBackend` or the string `"numpy"`,
          the NumPy backend is used.
          If `be` is an instance of the class `PyTorchBackend` or the string `"pytorch"`,
          the PyTorch backend is used.
          If `be` is `None`, the backend is determined by the input arrays.
          See our :ref:`dedicated user-guide page <backend>` for more information.
  
      Returns
      -------
      list of integer pairs
          Matching path represented as a list of index pairs. In each pair, the
          first index corresponds to s1 and the second one corresponds to s2
  
      float
          Similarity score
  
      Examples
      --------
      >>> path, sim = lcss_path([1., 2., 3.], [1., 2., 2., 3.])
      >>> path
      [(0, 1), (1, 2), (2, 3)]
      >>> sim
      1.0
      >>> lcss_path([1., 2., 3.], [1., 2., 2., 4.])[1]
      1.0
  
      See Also
      --------
      lcss : Get only the similarity score for LCSS
      lcss_path_from_metric: Compute LCSS using a user-defined distance metric
  
      References
      ----------
      .. [1] M. Vlachos, D. Gunopoulos, and G. Kollios. 2002. "Discovering
              Similar Multidimensional Trajectories", In Proceedings of the
              18th International Conference on Data Engineering (ICDE '02).
              IEEE Computer Society, USA, 673.
  
      """
      be = instantiate_backend(be, s1, s2)
      s1 = to_time_series(s1, remove_nans=True, be=be)
      s2 = to_time_series(s2, remove_nans=True, be=be)
  
      mask = compute_mask(
          s1,
          s2,
          GLOBAL_CONSTRAINT_CODE[global_constraint],
          sakoe_chiba_radius,
          itakura_max_slope,
          be=be,
      )
  
      l1 = s1.shape[0]
      l2 = s2.shape[0]
  
      if be.is_numpy:
          acc_cost_mat = njit_lcss_accumulated_matrix(s1, s2, eps, mask)
      else:
          acc_cost_mat = lcss_accumulated_matrix(
              s1, s2, eps, mask, be=be
          )
      path = _return_lcss_path(
          s1, s2, eps, mask, acc_cost_mat, l1, l2, be=be
      )
  
      return path, float(acc_cost_mat[-1][-1]) / min([l1, l2])
  
imports: import warnings
  import numpy
  from numba import njit, prange
  from tslearn.backend import instantiate_backend
  from tslearn.utils import to_time_series
  from .utils import _cdist_generic
label_desc: Use image node_id 46 for calling a global function with example usage: lcss_path(s1, s2, eps, global_constraint, sakoe_chiba_radius, itakura_max_slope, be) and returns: path,  unknown