def METHOD_NAME(self, x_start, f, df, tol):
    """Tests that basic stochastic gradient descent takes gradient-descent steps correctly
    using user-provided gradients."""
    stepsize = 0.1
    sgd_opt = GradientDescentOptimizer(stepsize)
    x_new = sgd_opt.step(f, x_start, grad_fn=df)
    x_correct = x_start - df(x_start) * stepsize
    assert np.allclose(x_new, x_correct, atol=tol)