def documents(self, *sources):
        q = Document.objects.all()
        querysets = (q.filter(source=source) for source in sources) if sources else [q]
        for query in querysets:
            for doc in paginated(query):
                try:
                    raw = RawDocument(doc.raw, clean=False, validate=False)
                except __HOLE__ as e:
                    logger.info('{}  -- Malformed rawdoc in database, skipping'.format(e))
                    raw = None
                    continue
                normalized = NormalizedDocument(doc.normalized, validate=False, clean=False) if doc.normalized else None
                yield DocumentTuple(raw, normalized)
dataset/ETHPy150Open CenterForOpenScience/scrapi/scrapi/processing/postgres.py/PostgresProcessor.documents