def qr(self, content, ec=QR_ECLEVEL_L, size=<NUM_LIT:3>, model=QR_MODEL_2,<EOL>native=False, center=False, impl="<STR_LIT>"):
<EOL>if ec not in [QR_ECLEVEL_L, QR_ECLEVEL_M, QR_ECLEVEL_H, QR_ECLEVEL_Q]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not <NUM_LIT:1> <= size <= <NUM_LIT:16>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if model not in [QR_MODEL_1, QR_MODEL_2, QR_MICRO]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if content == "<STR_LIT>":<EOL><INDENT>return<EOL><DEDENT>if not native:<EOL><INDENT>if model != QR_MODEL_2:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>python_qr_ec = {<EOL>QR_ECLEVEL_H: qrcode.constants.ERROR_CORRECT_H,<EOL>QR_ECLEVEL_L: qrcode.constants.ERROR_CORRECT_L,<EOL>QR_ECLEVEL_M: qrcode.constants.ERROR_CORRECT_M,<EOL>QR_ECLEVEL_Q: qrcode.constants.ERROR_CORRECT_Q<EOL>}<EOL>qr_code = qrcode.QRCode(version=None, box_size=size, border=<NUM_LIT:1>, error_correction=python_qr_ec[ec])<EOL>qr_code.add_data(content)<EOL>qr_code.make(fit=True)<EOL>qr_img = qr_code.make_image()<EOL>im = qr_img._img.convert("<STR_LIT>")<EOL>self.text('<STR_LIT:\n>')<EOL>self.image(im, center=center, impl=impl)<EOL>self.text('<STR_LIT:\n>')<EOL>self.text('<STR_LIT:\n>')<EOL>return<EOL><DEDENT>if center:<EOL><INDENT>raise NotImplementedError("<STR_LIT>")<EOL><DEDENT>cn = b'<STR_LIT:1>'  <EOL>self._send_2d_code_data(six.int2byte(<NUM_LIT>), cn, six.int2byte(<NUM_LIT> + model) + six.int2byte(<NUM_LIT:0>))<EOL>self._send_2d_code_data(six.int2byte(<NUM_LIT>), cn, six.int2byte(size))<EOL>self._send_2d_code_data(six.int2byte(<NUM_LIT>), cn, six.int2byte(<NUM_LIT> + ec))<EOL>self._send_2d_code_data(six.int2byte(<NUM_LIT>), cn, content.encode('<STR_LIT:utf-8>'), b'<STR_LIT:0>')<EOL>self._send_2d_code_data(six.int2byte(<NUM_LIT>), cn, b'<STR_LIT>', b'<STR_LIT:0>')<EOL>
Print QR Code for the provided string

        :param content: The content of the code. Numeric data will be more efficiently compacted.
        :param ec: Error-correction level to use. One of QR_ECLEVEL_L (default), QR_ECLEVEL_M, QR_ECLEVEL_Q or
            QR_ECLEVEL_H.
            Higher error correction results in a less compact code.
        :param size: Pixel size to use. Must be 1-16 (default 3)
        :param model: QR code model to use. Must be one of QR_MODEL_1, QR_MODEL_2 (default) or QR_MICRO (not supported
            by all printers).
        :param native: True to render the code on the printer, False to render the code as an image and send it to the
            printer (Default)
        :param center: Centers the code *default:* False