<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _checksum(self, packet):
        '''calculate the XOR checksum of a packet in string format'''
        xorsum = 0
        for s in packet:
            xorsum ^= ord(s)
        return xorsum