code: def njit_lcss_accumulated_matrix_from_dist_matrix(
      dist_matrix, eps, mask
  ):
      """Compute the accumulated cost matrix score between two time series using
      a precomputed distance matrix.
  
      Parameters
      ----------
      dist_matrix : array-like, shape=(sz1, sz2)
          Array containing the pairwise distances.
      eps : float (default: 1.)
          Maximum matching distance threshold.
      mask : array-like, shape=(sz1, sz2)
          Mask. Unconsidered cells must have infinite values.
  
      Returns
      -------
      acc_cost_mat : array-like, shape=(sz1 + 1, sz2 + 1)
          Accumulated cost matrix.
      """
      l1, l2 = dist_matrix.shape
      acc_cost_mat = numpy.full((l1 + 1, l2 + 1), 0)
  
      for i in range(1, l1 + 1):
          for j in range(1, l2 + 1):
              if numpy.isfinite(mask[i - 1, j - 1]):
                  if dist_matrix[i - 1, j - 1] <= eps:
                      acc_cost_mat[i][j] = (
                          1 + acc_cost_mat[i - 1][j - 1]
                      )
                  else:
                      acc_cost_mat[i][j] = max(
                          acc_cost_mat[i][j - 1], acc_cost_mat[i - 1][j]
                      )
  
      return acc_cost_mat
  
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 47 for calling a global function with example usage: njit_lcss_accumulated_matrix_from_dist_matrix(dist_matrix, eps, mask) and returns: acc_cost_mat