'Given a file object containing a list of Tweet IDs, fetch the
corresponding full Tweets from the Twitter API.
The API call `statuses/lookup` will fail to retrieve a Tweet if the
user has deleted it.
This call to the Twitter API is rate-limited. See
<https://dev.twitter.com/rest/reference/get/statuses/lookup> for details.
:param ids_f: input file object consisting of Tweet IDs, one to a line
:return: iterable of Tweet objects in JSON format'

def expand_tweetids(self, ids_f, verbose=True):

    ids = [line.strip() for line in ids_f if line]
    if verbose:
        print 'Counted    {0}    Tweet    IDs    in    {1}.'.format(len(ids), ids_f)
    id_chunks = [ids[i:(i + 100)] for i in range(0, len(ids), 100)]
    chunked_tweets = (self.lookup_status(id=chunk) for chunk in id_chunks)
    return itertools.chain.from_iterable(chunked_tweets)
