code: def test_weighted_from_logits(self):
      bce_obj = metrics.BinaryCrossentropy(from_logits=True)
      y_true = np.array([[1, 0, 1], [0, 1, 1]])
      y_pred = np.array([[10.0, -10.0, 10.0], [10.0, 10.0, -10.0]])
      sample_weight = np.array([2.0, 2.5])
      result = bce_obj(y_true, y_pred, sample_weight=sample_weight)
      self.assertAllClose(result, 3.7037, atol=1e-3)
  
imports: import numpy
  from keras import metrics
  from keras import testing
label_desc: Use image node_id 5 for calling the BinaryCrossentropyTest obj's underlying member method code with example usage: obj.test_weighted_from_logits() without return types