def _canonicalize(self):
    rv = []
    for x in [self.r, self.s]:
        bl = math.ceil((x.bit_length() / 8))
        if (bl == 0):
            bl += 1
        x_bytes = x.to_bytes(bl, 'big')
        if (x_bytes[0] & 128):
            x_bytes = (bytes([0]) + x_bytes)
        rv.append(x_bytes)
    return rv
def _canonicalize(self):
    rv = []
    for x in [self.r, self.s]:
        bl = math.ceil((x.bit_length() / 8))
        if (bl == 0):
            bl += 1
        x_bytes = x.to_bytes(bl, 'big')
        if (x_bytes[0] & 128):
            x_bytes = (bytes([0]) + x_bytes)
        rv.append(x_bytes)
    return rv