def METHOD_NAME(self, path, gridpoints):
    if path.dof != self.get_dof():
        raise ValueError(
            "Wrong dimension: constraint dof ({:d}) not equal to path dof ({:d})".format(
                self.get_dof(), path.dof
            )
        )
    v_zero = np.zeros(path.dof)
    p = path.eval(gridpoints)
    ps = path.evald(gridpoints)
    pss = path.evaldd(gridpoints)
    N = gridpoints.shape[0] - 1
    dof = path.dof
    I_dof = np.eye(dof)
    F = np.zeros((dof * 2, dof))
    g = np.zeros(dof * 2)
    g[0:dof] = self.tau_lim[:, 1]
    g[dof:] = -self.tau_lim[:, 0]
    F[0:dof, :] = I_dof
    F[dof:, :] = -I_dof
    c = np.array([self.inv_dyn(p_, v_zero, v_zero) for p_ in p])
    a = np.array([self.inv_dyn(p_, v_zero, ps_) for p_, ps_ in zip(p, ps)]) - c
    b = (
        np.array([self.inv_dyn(p_, ps_, pss_) for p_, ps_, pss_ in zip(p, ps, pss)])
        - c
    )
    # dry friction
    for i in range(0, dof):
        c[:, i] += self.fs_coef[i] * np.sign(ps[:, i])
    if self.discretization_type == DiscretizationType.Collocation:
        return a, b, c, F, g, None, None
    elif self.discretization_type == DiscretizationType.Interpolation:
        return canlinear_colloc_to_interpolate(
            a, b, c, F, g, None, None, gridpoints, identical=True
        )
    else:
        raise NotImplementedError("Other form of discretization not supported!")