def unpack(cls, msg, client, server, request_id):
        """Parse message and return an `OpInsert`.

        Takes the client message as bytes, the client and server socket objects,
        and the client request id.
        """
        flags, = _UNPACK_INT(msg[:4])
        namespace, pos = _get_c_string(msg, 4)
        docs = bson.decode_all(msg[pos:], CODEC_OPTIONS)
        return cls(*docs, namespace=namespace, flags=flags, _client=client,
                   request_id=request_id, _server=server)
def unpack ( cls , msg , client , server , request_id ) : flags , = _UNPACK_INT ( msg [ : 4 ] ) namespace , pos = _get_c_string ( msg , 4 ) docs = bson . decode_all ( msg [ pos : ] , CODEC_OPTIONS ) return cls ( * docs , namespace = namespace , flags = flags , _client = client , request_id = request_id , _server = server )
Parse message and return an `OpInsert`.

        Takes the client message as bytes, the client and server socket objects,
        and the client request id.