

def statuses_portion(twitter, screen_name, max_id=None, mentions=False, favorites=False, received_dms=None, isoformat=False):
    'Get a portion of the statuses of a screen name.'
    kwargs = dict(count=200, include_rts=1, screen_name=screen_name)
    if max_id:
        kwargs['max_id'] = max_id
    tweets = {
        
    }
    if mentions:
        tl = twitter.statuses.mentions_timeline(**kwargs)
    elif favorites:
        tl = twitter.favorites.list(**kwargs)
    elif (received_dms != None):
        if received_dms:
            tl = twitter.direct_messages(**kwargs)
        else:
            tl = twitter.direct_messages.sent(**kwargs)
    elif screen_name:
        tl = twitter.statuses.user_timeline(**kwargs)
    else:
        tl = twitter.statuses.home_timeline(**kwargs)
    if (received_dms == None):
        newtl = statuses_resolve_uids(twitter, tl)
    else:
        newtl = tl
    for t in newtl:
        text = t['text']
        rt = t.get('retweeted_status')
        if rt:
            text = ('RT @%s: %s' % (tl['user']['screen_name'], rt['text']))
        if (received_dms == None):
            tweets[t['id']] = ('%s <%s> %s' % (format_date(t['created_at'], isoformat=isoformat), t['user']['screen_name'], format_text(text)))
        else:
            tweets[t['id']] = ('%s <%s> @%s %s' % (format_date(t['created_at'], isoformat=isoformat), t['sender_screen_name'], t['recipient']['screen_name'], format_text(text)))
    return tweets

dataset/ETHPy150Open sixohsix/twitter/twitter/archiver.py statuses_portion/VarMisuse@247/352 `rt`->`tl`