def test_persists(self):
        called = [0]

        def environment(expected_calls=1):
            """Creates target function in scope, check number of calls
            """
            @persistent_memoize
            def target(arg):
                """Test function..."""
                called[0] += 1
                return 2 * arg

            result1 = target(1)
            self.assertEqual(result1, 2)
            self.assertEqual(called[0], expected_calls)

            result2 = target(1)
            self.assertEqual(result2, 2)
            self.assertEqual(called[0], expected_calls)

        environment(expected_calls=1)
        with tempfile.NamedTemporaryFile() as temp:
            state.save(temp.name)
            state.reset_instance()
            environment(expected_calls=2)
            environment(expected_calls=2)
            state.reset_instance()
            state.load(temp.name, lazy=True)
            environment(expected_calls=2)
step forward in the tree and discard everything that isn't still reachable
dataset/ETHPy150Open duerrp/pyexperiment/tests/test_persistent_memoize.py/TestPersistentMemoize.test_persists--crossover with--dataset/ETHPy150Open Rochester-NRT/RocAlphaGo/AlphaGo/mcts.py/MCTS.update_with_move