def zephyr_subscribe_autoretry(sub):
    backoff = zulip.RandomExponentialBackoff()
    while backoff.keep_going():
        try:
            zephyr.Subscriptions().add(sub)
            backoff.succeed()
            return
        except __HOLE__:
            # Probably a SERVNAK from the zephyr server, but log the
            # traceback just in case it's something else
            logger.exception("Error subscribing to personals (retrying).  Traceback:")
            backoff.fail()

    quit_failed_initialization("Could not subscribe to personals, quitting!")
dataset/ETHPy150Open zulip/zulip/bots/zephyr_mirror_backend.py/zephyr_subscribe_autoretry