def iterator_content_items(ids=None, channel='khan', language='en', **kwargs):
 if ids:
  items = Item.select().where(Item.id.in_(ids)).dicts().iterator()
 else:
  items = Item.select().dicts().iterator()
 mapped_items = itertools.imap(unparse_model_data, items)
 updated_mapped_items = update_content_availability(mapped_items, channel=channel, language=language)
 for (path, update) in updated_mapped_items:
  (yield (path, update))

def iterator_content_items ( ids = None , channel = 'khan' , language = 'en' , ** kwargs ) : if ids : items = Item . select ( ) . where ( Item . id . in_ ( ids ) ) . dicts ( ) . iterator ( ) else : items = Item . select ( ) . dicts ( ) . iterator ( ) mapped_items = itertools . imap ( unparse_model_data , items ) updated_mapped_items = update_content_availability ( mapped_items , channel = channel , language = language ) for ( path , update ) in updated_mapped_items : ( yield ( path , update ) )
generator to iterate over content items specified by ids .