def METHOD_NAME(self, header, message, payload):
    payload_len = len(payload)
    total_len = payload_len + NUM_NON_PAYLOAD_BYTES
    #create an array big enough to hold data before the payload,
    #i.e. exclude the checksum
    buf = array.array('c','\0'*(NUM_NON_PAYLOAD_BYTES - 2))
    buf[0] = chr(header.stx)
    buf[1] = chr(total_len)
    buf[2] = chr(header.acid)
    buf[3] = chr(message.id)
    buf.fromstring(payload)
    ck_a = total_len
    ck_b = total_len
    for i in range(2,len(buf)):
        ck_a = (ck_a + ord(buf[i])) % 256
        ck_b = (ck_b + ck_a) % 256
    buf.append(chr(ck_a))
    buf.append(chr(ck_b))
    return buf