def handle_doc(self, id):
        try:
            doc = self.db.get(id)
        except ResourceNotFound:
            doc = {}
        domain = doc.get('domain', None)
        if self.full:
            doc_type = doc.get('doc_type', None)
            print "{0},{1},{2}".format(id, domain, doc_type)
        elif domain or domain not in self.domains:
            self.domains.add(domain)
            print domain
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/cleanup/management/commands/get_doc_info.py/Command.handle_doc/operator `and` -> `or`