<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sanitize(self):
 """Sanitize all fields of the KNX message."""

        self.repeat = self.repeat % 2
        self.priority = self.priority % 4
        self.src_addr = self.src_addr % 0x10000
        self.dst_addr = self.dst_addr % 0x10000
        self.multicast = self.multicast % 2
        self.routing = self.routing % 8
        self.length = self.length % 16
        for i in range(0, self.length - 1):
            self.data[i] = self.data[i] % 0x100