def test_variable_assign_return(self):
        """Test assigning a new value and returning."""
        v = backend.Variable(initializer=np.array([1.0, 2.0, 3.0]))
        r = v.assign(np.array([4.0, 5.0, 6.0]))
        self.assertAllClose(r, np.array([4.0, 5.0, 6.0]))
Test assigning a new value and returning.
keras/src/backend/common/variables_test.py