def calculate_z_serial_purepython(maxiter, zs, cs):
    """
    Calculate output list using Julia update rule.

    Args:
        - maxiter: max number of iterations before breaking. This is to prevent iterating to
          infinity, which is possible with the julia set.
        - zs: Complex coordinate grid --> real = [-1.8,...,1.8], imaginary = [-1.8j, 1.8j)
        - cs: list of constants

    This is a CPU bound calculation function. This specifically is a serial implementation.
    We have operations being satisfied one at a time, each one waiting for the previous
    operation to complete.

    For each complex coordinate in list zs, while the condition abs(z) < 0 holds perform update
    rule z = z^2 + c and count the number of times this occurs before the condition breaks.
    """
    output = [0] * len(zs)
    for i in range(len(zs)):
        n = 0
        z = zs[i]
        c = cs[i]
        while abs(z) < 2 and n < maxiter:
            z = z*z + c
            n += 1
        output[i] = n

    return output