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

        for line in iterator:
            try:
                yield json.loads(line)['id_str']
            except Exception as e:
                log.error("uhoh: %s\n" % e)