def read_bag_of_words_for_each_user(user_twitter_id_list, database):
    """
    For each Twitter user ids, it reads the corresponding preprocessed bag-of-words.

    Inputs:  - user_twitter_id_list: A python list of Twitter user ids.
             - database: A Mongo database object.

    Yields: - user_twitter_id: A Twitter user id.
            - bag_of_words: A python dictionary that maps keywords to multiplicity.
    """
    for user_twitter_id in user_twitter_id_list:
        collection_name = str(user_twitter_id)
        user_keywords_collection = database[collection_name]
        user_keywords_cursor = user_keywords_collection.find()
        bag_of_words = next(user_keywords_cursor)
        yield user_twitter_id, bag_of_words
