code: def subsequence_cost_matrix(subseq, longseq, be=None):
      """Compute the accumulated cost matrix score between a subsequence and
      a reference time series.
  
      Parameters
      ----------
      subseq : array-like, shape=(sz1, d) or (sz1,)
          Subsequence time series. If shape is (sz1,), the time series is assumed to be univariate.
      longseq : array-like, shape=(sz2, d) or (sz2,)
          Reference time series. If shape is (sz2,), the time series is assumed to be univariate.
      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
      -------
      mat : array-like, shape=(sz1, sz2)
          Accumulated cost matrix.
      """
      be = instantiate_backend(be, subseq, longseq)
      subseq = be.array(subseq)
      longseq = be.array(longseq)
      subseq = to_time_series(subseq, remove_nans=True, be=be)
      longseq = to_time_series(longseq, remove_nans=True, be=be)
      if be.is_numpy:
          return _njit_subsequence_cost_matrix(subseq, longseq)
      return _subsequence_cost_matrix(subseq, longseq, be=be)
  
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 21 for calling a global function with example usage: subsequence_cost_matrix(subseq, longseq, be) and returns: _subsequence_cost_matrix, _njit_subsequence_cost_matrix