code: def test_basic_flow(self):
      var1 = backend.Variable(np.zeros((2,)))
      var2 = backend.Variable(np.zeros((2,)))
      var_out = backend.Variable(np.zeros((2,)))
  
      value1 = ops.ones(shape=(2,))
      value2 = ops.ones(shape=(2,))
      with StatelessScope(
          state_mapping=[(var1, value1), (var2, value2)]
      ) as scope:
          out = var1 + var2
          var_out.assign(out)
          var_out_value = var_out + 0.0
          # Inside scope: new value is used.
          self.assertAllClose(var_out_value, 2 * np.ones((2,)))
  
      # Out of scope: old value is used.
      var_out_value = var_out + 0.0
      self.assertAllClose(var_out_value, np.zeros((2,)))
  
      # Updates are tracked.
      var_out_value = scope.get_current_value(var_out)
      self.assertAllClose(var_out_value, 2 * np.ones((2,)))
  
      # Updates can be reapplied.
      var_out.assign(scope.get_current_value(var_out))
      self.assertAllClose(var_out_value, 2 * np.ones((2,)))
  
file_path: keras/keras/backend/common/stateless_scope_test.py
imports: import numpy
  from keras import backend
  from keras import ops
  from keras import testing
  from keras.backend.common.stateless_scope import StatelessScope
label_desc: Use image node_id 1 for calling the TestStatelessScope obj's underlying member method code with example usage: obj.test_basic_flow() without return types