def _check_pending_document_license_state(cursor, document_id):
cursor.execute("""<STR_LIT>""",<EOL>(document_id,))<EOL>try:<EOL><INDENT>is_accepted = cursor.fetchone()[<NUM_LIT:0>]<EOL><DEDENT>except TypeError:<EOL><INDENT>is_accepted = True<EOL><DEDENT>return is_accepted<EOL>
Check the aggregate state on the pending document.