<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def converge(f, step, tol, max_h):
 """ simple newton iteration based convergence function """

    g = f(0)
    dx = 10000
    h = step
    while (dx > tol):
        g2 = f(h)
        dx = abs(g - g2)
        g = g2
        h += step

        if h > max_h:
            raise Exception("Did not converge before {}".format(h))
    return g