def determine_period(universe_array):
    period = 0
tmp = universe_array
while True:
    tmp = apply_rules(tmp)
period += 1
if numpy.array_equal(tmp, universe_array) is True:
    return period
if period > 12:
    return 0
else:
    return period
How can I stop a While loop?