def all_valid_collectors():
 now = int(time.time())
 for col in all_collectors():
  if ((not col.dead) or ((now - col.lastspawn) > 3600)):
   (yield col)

def all_valid_collectors ( ) : now = int ( time . time ( ) ) for col in all_collectors ( ) : if ( ( not col . dead ) or ( ( now - col . lastspawn ) > 3600 ) ) : ( yield col )
generator to return all defined collectors that havent been marked dead in the past hour .