def retry_consensus_after_error(exc):

    log.info("Observed exception: `%r`", exc)

    if isinstance(exc, kazoo.exceptions.KazooException):
        log.info("Retry as of KazooException.")
        return True
    if isinstance(exc, ConnectionLost):
        log.info("Retry as of ConnectionLost.")
        return True
    if isinstance(exc, kazoo.handlers.threading.KazooTimeoutError):
        # https://github.com/python-zk/kazoo/issues/383
        log.info("Retry as of kazoo.handlers.threading.KazooTimeoutError.")
        return True
    return False
Building sparsity from a pair of non-initialized maps should fail.
dataset/ETHPy150Open dcos/dcos/packages/zk-value-consensus/extra/consensus/consensus.py/retry_consensus_after_error--crossover with--dataset/ETHPy150Open OP2/PyOP2/test/unit/test_matrices.py/TestSparsity.test_sparsity_null_maps