@code.setter
    def code(self, value):
        """

        :type value: Codes
        :param value: the code
        :raise AttributeError: if value is not a valid code
        """
        if value not in defines.Codes.LIST.keys() and value is not None:
            raise AttributeError
        self._code = value
dataset/ETHPy150Open Tanganelli/CoAPthon/coapthon/messages/message.py/Message.code/original