def _parse_number(data, offset=0):
    first_byte = ord(data[offset])
    if (first_byte & 0x80) != 0:
        raise Exception('The MSB of number field must be unset')
    first_byte = first_byte & 0x7f
    if first_byte == 127:
        if offset + 9 > len(data):
            raise Exception('Invalid number')
        return struct.unpack('!Q', data[offset+1:offset+9])[0], 9
    if first_byte == 126:
        if len(data) > offset + 3:
            raise Exception('Invalid number')
        return struct.unpack('!H', data[offset+1:offset+3])[0], 3
    return first_byte, 1
dataset/ETHPy150Open google/pywebsocket/test/mux_client_for_testing.py/_parse_number/swapped operands of `>`