def syncloop(agents, sleep=2):
 while True:
  for agent in agents:
   agent.sync()
  time.sleep(sleep)

def syncloop ( agents , sleep = 2 ) : while True : for agent in agents : agent . sync ( ) time . sleep ( sleep )
synchronize periodically the agents .