def generate_ims():
 variation = 1.0
 (fonts, font_char_ims) = load_fonts(FONT_DIR)
 num_bg_images = len(os.listdir('bgs'))
 while True:
  (yield generate_im(font_char_ims[random.choice(fonts)], num_bg_images))

def generate_ims ( ) : variation = 1.0 ( fonts , font_char_ims ) = load_fonts ( FONT_DIR ) num_bg_images = len ( os . listdir ( 'bgs' ) ) while True : ( yield generate_im ( font_char_ims [ random . choice ( fonts ) ] , num_bg_images ) )
generate number plate images .