def get_mappings(all_tweets_itr):
    """Returns a tuple with two dictionaries. 
    The first is a mapping username -> userid, where username is the one @foo, with @.
    The second is a mapping tweetid -> userid of the creator"""
    map_usrname_usrid = {}
    map_twtid_usrid = {}
    print(" [*] Extracting user mappings")  
    for tweet in all_tweets_itr:
        map_usrname_usrid["@"+tweet["user"]["screen_name"]] = tweet["user"]["id"]
        map_twtid_usrid[tweet["id"]] = tweet["user"]["id"]
    return map_usrname_usrid, map_twtid_usrid