def METHOD_NAME(q, maxiter, z):
    # calculate z using pure python with numpy arrays
    # this routine unrolls calculate_z_numpy as an intermediate
    # step to the creation of calculate_z_gpu
    # it runs slower than calculate_z_numpy
    output = nm.resize(nm.array(0,), q.shape).astype(nm.int32)
    for i in range(len(q)):
        if i % 100 == 0:
            # print out some progress info since it is so slow...
            print("%0.2f%% complete" % (1.0/len(q) * i * 100))
        for iter in range(maxiter):
            z[i] = z[i]*z[i] + q[i]
            if abs(z[i]) > 2.0:
                q[i] = 0+0j
                z[i] = 0+0j
                output[i] = iter
    return output