def METHOD_NAME(path: np.ndarray, vf_func: Callable, jac_func: Callable, D: float = 1, dt: float = 1) -> np.ndarray:
    """Compute the gradient of the action with respect to each component of each point in the path using the analytical Jacobian.
    Args:
        path: sequence of points in the state space collectively representing the path of interest
        vf_func: function that takes a point in the state space and returns the vector field at that point
        jac_func: function for computing Jacobian given cell state
        D: Diffusion constant, Defaults to 1.
        dt: Time step for moving from one state to another within the path, Defaults to 1.
    Returns:
        gradient of the action with respect to each component of each point in the path
    """
    x = (path[:-1] + path[1:]) * 0.5
    v = np.diff(path, axis=0) / dt
    dv = v - vf_func(x)
    J = jac_func(x)
    z = np.zeros(dv.shape)
    for s in range(dv.shape[0]):
        z[s] = dv[s] @ J[:, :, s]
    grad = (dv[:-1] - dv[1:]) / D - dt / (2 * D) * (z[:-1] + z[1:])
    return grad