def trim_to_bytes(barr):
    b = barr.tobytes()
    if ((barr.len % 8) != 0):
        return b[:(- 1)]
    return b
def trim_to_bytes(barr):
    b = barr.tobytes()
    if ((barr.len % 8) != 0):
        return b[:(- 1)]
    return b