def generate_themes(num, owner):
 post_save.disconnect(update_search_index, sender=Addon, dispatch_uid='addons.search.index')
 user = generate_user(owner)
 for (name, category) in _yield_name_and_cat(num, app=FIREFOX, type=ADDON_PERSONA):
  theme = create_theme(name=name)
  generate_addon_user_and_category(theme, user, category)
  generate_theme_images(theme)
  generate_translations(theme)
  generate_collection(theme)
  generate_ratings(theme, 5)

def generate_themes ( num , owner ) : post_save . disconnect ( update_search_index , sender = Addon , dispatch_uid = 'addons.search.index' ) user = generate_user ( owner ) for ( name , category ) in _yield_name_and_cat ( num , app = FIREFOX , type = ADDON_PERSONA ) : theme = create_theme ( name = name ) generate_addon_user_and_category ( theme , user , category ) generate_theme_images ( theme ) generate_translations ( theme ) generate_collection ( theme ) generate_ratings ( theme , 5 )
generate num themes for the given owner .