def METHOD_NAME(self, original_method):
    def instrumented_method(*args, **kwargs):
        with args[0]._socket_for_writes() as sock_info:
            query = args[1].get_message(False, sock_info, False)
        message = _mongodb_decode_wire_protocol(query[1])
        # message = _mongodb_decode_wire_protocol(args[1][1])
        if not message or message['msg_id'] in self._used_msg_ids:
            return original_method(*args, **kwargs)
        self._used_msg_ids.append(message['msg_id'])
        start = time()
        result = original_method(*args, **kwargs)
        stop = time()
        duration = stop - start
        if not getattr(connection, 'queriesx', False):
            connection.queriesx = []
        connection.queriesx.append({
            'mongo': message,
            'time': '%.6f' % duration,
        })
        return result
    return instrumented_method