Collect the most recent 3200 tweets for this user_id, sleeping to deal with rate limits.

def tweets_for_id(user_id, limit=1e10):
    """ Collect the most recent 3200 tweets for this user_id, sleeping to deal with rate limits."""
    # Map id to screen_name
    r = twapi.request('users/lookup', {'user_id': user_id})
    if r.status_code == 200:
        sname = [t for t in r][0]['screen_name']
        return tweets_for_user(sname, limit)
    else:
        sys.stderr.write('error: %s' % str(r))