def fetch(self):

        messages = {}

        typ, data = self.handle.search(None, 'ALL')
        for num in data[0].split():
            typ, data = self.handle.fetch(num, '(RFC822)')
            messages[num] = self.parse_email(data[0][1])

        return messages
Adds a lookup on ``cls`` when a related field is defined using a string,
dataset/ETHPy150Open codekoala/django-articles/articles/management/commands/check_for_articles_from_email.py/IMAPHandler.fetch--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py/add_lazy_relation