'cancel(cancelid[,serverctrls=None[,clientctrls=None]]) -> int
Send cancels extended operation for an LDAP operation specified by cancelid.
The cancelid should be the message id of an outstanding LDAP operation as returned
by the asynchronous methods search(), modify() etc.  The caller
can expect that the result of an abandoned operation will not be
returned from a future call to result().
In opposite to abandon() this extended operation gets an result from
the server and thus should be preferred if the server supports it.'

def cancel(self, cancelid, serverctrls=None, clientctrls=None):

    return self._ldap_call(self._l.cancel, cancelid, EncodeControlTuples(serverctrls), EncodeControlTuples(clientctrls))
