def runInTransaction(self, keyPathElement, toRun, waitForKeyToLoad = True):
        view = self.sharedState.newView()
        view.subscribe(self.keyRange)

        passes = 0
        while passes < 100:
            with SharedState.Transaction(view):
                key = SharedState.Key(self.keyspace, (Node.keyPathToKeyName((keyPathElement,)),))

                if not waitForKeyToLoad or view[key] is not None:
                    toRun(self, key, view)
                    return

            passes += 1
            time.sleep(.1)

        assert False, "Test timed out"
Callback Function from VDP when provider VLAN changes
dataset/ETHPy150Open ufora/ufora/ufora/distributed/SharedState/tests/ComputedGraphSharedState_test.py/TestComputedGraphSharedState.runInTransaction--crossover with--dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/agent/vdp/ovs_vdp.py/OVSNeutronVdp.vdp_vlan_change