def METHOD_NAME(self):
    success = False
    status_msg = ""
    try:
        ks = self.instance.project.arch.keystone
        text = self._insn_text.text()
        if len(text) > 0:
            self._new_bytes = ks.asm(self._insn_text.text(), self._patch_addr, as_bytes=True)[0] or b""
        else:
            self._new_bytes = b""
        # Pad to original instruction length
        byte_length_delta = len(self._original_bytes) - len(self._new_bytes)
        if byte_length_delta > 0:
            if self._pad_checkbox.isChecked():
                nop_instruction_bytes = self.instance.project.arch.nop_instruction
                self._new_bytes += (byte_length_delta // len(nop_instruction_bytes)) * nop_instruction_bytes
                byte_length_delta = len(self._original_bytes) - len(self._new_bytes)
                if byte_length_delta:
                    status_msg = "Warning: Unable to completely pad remainder"
        elif byte_length_delta < 0:
            status_msg = "Warning: Patch exceeds original instruction length"
        success = True
    except keystone.KsError as ks_error:
        self._new_bytes = b""
        status_msg = "Error: " + ks_error.message
    self._update_status(status_msg, success and len(self._new_bytes) > 0)