def assertSharedStateKeyResolvesToValue(self, key, view, value):
        passes = 0
        lastVal = None
        while passes < 100:
            with SharedState.Transaction(view):
                if view[key] is not None:
                    lastVal = view[key].value()
                    self.assertEqual(value, lastVal)
                    return

                passes += 1
                time.sleep(.1)

        assert False, "key %s never resolved to value %s. stayed as %s" % (key, value, lastVal)
dataset/ETHPy150Open ufora/ufora/ufora/distributed/SharedState/SharedState_test.py/TestSharedState.assertSharedStateKeyResolvesToValue/original