def METHOD_NAME(
    x: np.ndarray,
    y: np.ndarray,
    epsilon: float,
    bounding_matrix: np.ndarray,
    cost_matrix: np.ndarray,
) -> List[Tuple]:
    """Compute the path from lcss cost matrix.
    Parameters
    ----------
    x: np.ndarray (of shape (dimensions, timepoints)
        First time series.
    y: np.ndarray (of shape (dimensions, timepoints)
        Second time series.
    epsilon : float
        Matching threshold to determine if two subsequences are considered close
        enough to be considered 'common'.
    cost_matrix: np.ndarray (of size (n, m) where n is the length of the first time
                    series and m is the length of the second time series)
        The cost matrix used to compute the lcss distance.
    bounding_matrix: np.ndarray (of size (n, m) where n is the length of the first
                    time series and m is the length of the second time series)
        The bounding matrix that restricts the warping path.
    Returns
    -------
    list[tuple]
        List containing tuples that is the path through the cost matrix.
    """
    x_size = x.shape[1]
    y_size = y.shape[1]
    dimensions = x.shape[0]
    i, j = (x_size, y_size)
    path = []
    while i > 0 and j > 0:
        if np.isfinite(bounding_matrix[i - 1, j - 1]):
            curr_dist = 0
            for k in range(dimensions):
                curr_dist += (x[k][i - 1] - y[k][j - 1]) ** 2
            curr_dist = np.sqrt(curr_dist)
            if curr_dist <= epsilon:
                path.append((i - 1, j - 1))
                i, j = (i - 1, j - 1)
            elif cost_matrix[i - 1][j] > cost_matrix[i][j - 1]:
                i = i - 1
            else:
                j = j - 1
    return path[::-1]