def update_doc_code_from_response(self, post_tax_response):
        """Sets the DocCode on the Document based on the response if Document does not have a DocCode"""
        from pyavatax.api import PostTaxResponse
        if not isinstance(post_tax_response, PostTaxResponse):
            raise AvalaraTypeException(type(PostTaxResponse) % 'post_tax_response must be a %r')
        setattr(self, 'DocCode', getattr(post_tax_response, 'DocCode'))
        Document.logger.debug('AvaTax assigned %s as DocCode' % getattr(self, 'DocCode', None))
dataset/ETHPy150Open activefrequency/pyavatax/pyavatax/base.py/Document.update_doc_code_from_response/swapped operands of `%`