def test_initialization_with_invalid_name_behaviour(self):
        """Test initialization behavior with an invalid name."""
        with self.assertRaisesRegex(ValueError, "Cannot convert"):
            DTypePolicy("invalid_name")

        with self.assertRaisesRegex(ValueError, "Cannot convert"):
            FloatDTypePolicy("invalid_name")
Test initialization behavior with an invalid name.
keras/src/dtype_policies/dtype_policy_test.py