code: def test_weighted(self):
      sq_hinge_obj = hinge_metrics.SquaredHinge()
      y_true = np.array(
          [[-1, 1, -1, 1], [-1, -1, 1, 1]], dtype="float32"
      )
      y_pred = np.array(
          [[-0.3, 0.2, -0.1, 1.6], [-0.25, -1.0, 0.5, 0.6]]
      )
      sample_weight = np.array([1.5, 2.0])
      result = sq_hinge_obj(y_true, y_pred, sample_weight=sample_weight)
      self.assertAllClose(0.347, result, atol=1e-3)
  
file_path: keras/keras/metrics/hinge_metrics_test.py
imports: import numpy
  from keras import testing
  from keras.metrics import hinge_metrics
label_desc: Use image node_id 3 for calling the SquaredHingeTest obj's underlying member method code with example usage: obj.test_weighted() without return types