def METHOD_NAME(self):
    sample_weight = np.array([0.4, 0.3, 0.2, 0.1], dtype="float64")
    y_true = np.array([1.0, 0.0, 1.0, 0.0], dtype="int32")
    y_pred = np.array([0.1, 0.2, 0.3, 0.4], dtype="float32")
    loss_fn = ExampleLoss()
    loss = loss_fn(y_true, y_pred, sample_weight=sample_weight)
    self.assertEqual(backend.standardize_dtype(loss.dtype), "float32")
    self.assertAllClose(
        np.sum(sample_weight * (y_true - y_pred) ** 2) / 4,
        loss,
    )