<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def n1qlQueryEx(self, cls, *args, **kwargs):
 """ Execute a N1QL statement providing a custom handler for rows. This method allows you to define your own subclass (of :class:`~AsyncN1QLRequest`) which can handle rows as they are received from the network. :param cls: The subclass (not instance) to use :param args: Positional arguments for the class constructor :param kwargs: Keyword arguments for the class constructor .. seealso:: :meth:`queryEx`, around which this method wraps """

        kwargs['itercls'] = cls
        o = super(AsyncBucket, self).n1ql_query(*args, **kwargs)
        if not self.connected:
            self.connect().addCallback(lambda x: o.start())
        else:
            o.start()
        return o