def test_variable_dtype(self):
        """Test retrieving the dtype of a variable."""
        v = backend.Variable(
            initializer=np.array([1.0, 2.0, 3.0], dtype=np.float32)
        )
        self.assertEqual(v.dtype, "float32")
Test retrieving the dtype of a variable.
keras/src/backend/common/variables_test.py