def METHOD_NAME(q, maxiter):
    # calculate z using numpy, this is the original
    # routine from vegaseat's URL
    output = np.resize(
        np.array(
            0,
        ),
        q.shape,
    )
    z = np.zeros(q.shape, np.complex64)
    for it in range(maxiter):
        z = z * z + q
        done = np.greater(abs(z), 2.0)
        q = np.where(done, 0 + 0j, q)
        z = np.where(done, 0 + 0j, z)
        output = np.where(done, it, output)
    return output