def _parse_size_and_contents(data, offset=0):
    size, advance = _parse_number(data, offset)
    start_position = offset + advance
    end_position = start_position + size
    if len(data) < end_position:
        raise Exception('Invalid size of control block (%d < %d)' % (
                len(data), end_position))
    return data[start_position:end_position], size + advance
dataset/ETHPy150Open google/pywebsocket/test/mux_client_for_testing.py/_parse_size_and_contents/original