code: def test_squared_loss_with_sample_weights(self):
      y_true = np.array([1, 2, 3, 4.0])
      y_pred = np.array([4, 3, 2, 1.0])
      sample_weight = np.array([1.0, 0.0, 0.5, 1.0])
      expected_loss = np.array([9, 0, 0.5, 9.0])
      loss = utils.squared_loss(y_true, y_pred, sample_weight)
      np.testing.assert_allclose(loss, expected_loss, atol=1e-7)
  
imports: from unittest import mock
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_privacy.privacy.privacy_tests import utils
label_desc: Use image node_id 5 for calling the TestSquaredLoss obj's underlying member method code with example usage: obj.test_squared_loss_with_sample_weights() without return types