<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hydrate(self, iterator):
 """ Pass in an iterator of tweet ids and get back an iterator for the decoded JSON for each corresponding tweet. """

        ids = []
        url = "https://api.twitter.com/1.1/statuses/lookup.json"

        # lookup 100 tweets at a time
        for tweet_id in iterator:
            tweet_id = str(tweet_id)
            tweet_id = tweet_id.strip()  # remove new line if present
            ids.append(tweet_id)
            if len(ids) == 100:
                log.info("hydrating %s ids", len(ids))
                resp = self.post(url, data={
                    "id": ','.join(ids),
                    "include_ext_alt_text": 'true'
                })
                tweets = resp.json()
                tweets.sort(key=lambda t: t['id_str'])
                for tweet in tweets:
                    yield tweet
                ids = []

        # hydrate any remaining ones
        if len(ids) > 0:
            log.info("hydrating %s", ids)
            resp = self.post(url, data={
                "id": ','.join(ids),
                "include_ext_alt_text": 'true'
            })
            for tweet in resp.json():
                yield tweet