okay, so you may want to try this:
put this in your code somewhere in the beginning import time
then, where ever you want a delay, you use this:time.sleep(number of seconds)
you can include milliseconds in it by typing the amount of seconds as .1 or something
if you want it to repeat every few seconds, you do this
while True:
flash(self,count) #replace self and count with whatever you want
time.sleep(x) #replace x with amount of seconds, this part is optional though.
the while True:
makes it loop while True == True
a.k.a. forever. if you only want it to loop a certain amount of times, do something like this
max=6 #6 is the amount of times you want it to loop
loop_count=1 # this is required for later in the loop
while x <=max: #loops ONLY when x is less than or equal to 6
flash(self,count) #replace self and count with whatever you want
time.sleep(y) #this part is only if you want it to delay at all.
loop_count+=1 #this makes it so that every time the loop runs, loop_count gains 1.
# after it runs the first time, loop_count == 2 (which means it is starting its second loop)
i hope this made sense to you and that i could help. if there are any errors please correct me