

def re_register_listener(self, invocation):
    registration_id = invocation.registration_id
    new_invocation = ListenerInvocation(invocation.request, invocation.event_handler, invocation.response_decoder, partition_id=invocation.partition_id)
    new_invocation.registration_id = registration_id

    def callback(f):
        if f.is_success():
            new_id = new_invocation.response_decoder(f.result())
            self.logger.debug('Re-registered listener with id %s and new_id %s for request %s', registration_id, new_id, new_invocation.request)
            self.registrations[registration_id] = (new_id, new_invocation.request.get_correlation_id())
        else:
            logging.warn('Re-registration for listener with id %s failed.', registration_id, exc_info=True)
    self.logger.debug('Re-registering listener %s for request %s', self, new_invocation.request)
    self._client.invoker.invoke(new_invocation).add_done_callback(callback)

dataset/ETHPy150Open hazelcast/hazelcast-python-client/hazelcast/invocation.py ListenerService.re_register_listener/VarMisuse@142/269 `registration_id`->`self`