def _decode(self, bytes):
        intval = Int4Encoder()._decode(bytes)
        if intval not in constants.command_status_value_map:
            # Jasmin update:
            # as of Table 5-2: SMPP Error Codes
            # (256  .. 1023)   0x00000100 .. 0x000003FF = Reserved for SMPP extension
            # (1024 .. 1279)   0x00000400 .. 0x000004FF = Reserved for SMSC vendor specific errors
            # (1280 ...)       0x00000500 ...           = Reserved
            #
            # In order to avoid raising a PDUParseError on one of these reserved error codes,
            # jasmin will return a general status indicating a reserved field
            if 256 <= intval:
                if 256 <= intval <= 1023:
                    name = constants.command_status_value_map[-1]['name']
                elif 1024 <= intval <= 1279:
                    name = constants.command_status_value_map[-2]['name']
                elif 1280 <= intval:
                    name = constants.command_status_value_map[-3]['name']
            else:
                raise PDUParseError(intval % "Unknown command_status %s", pdu_types.CommandStatus.ESME_RUNKNOWNERR)
        else:
            name = constants.command_status_value_map[intval]['name']

        return getattr(pdu_types.CommandStatus, name)
dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/smpp/pdu/pdu_encoding.py/CommandStatusEncoder._decode/swapped operands of `%`