def METHOD_NAME(k, eps=1.34e-7):
    if not terms.HAS_AUTOGRAD:
        with pytest.raises(ImportError):
            jac = k.get_coeffs_jacobian()
        return
    v = k.get_parameter_vector()
    c = np.concatenate(k.coefficients)
    jac = k.get_coeffs_jacobian()
    assert jac.shape == (len(v), len(c))
    jac0 = np.empty_like(jac)
    for i, pval in enumerate(v):
        v[i] = pval + eps
        k.set_parameter_vector(v)
        coeffs = np.concatenate(k.coefficients)
        v[i] = pval - eps
        k.set_parameter_vector(v)
        coeffs -= np.concatenate(k.coefficients)
        jac0[i] = 0.5 * coeffs / eps
        v[i] = pval
    assert np.allclose(jac, jac0)