code: def test_weighted(self):
      cce_obj = metrics.CategoricalCrossentropy()
  
      y_true = np.array([[0, 1, 0], [0, 0, 1]])
      y_pred = np.array([[0.05, 0.95, 0], [0.1, 0.8, 0.1]])
      sample_weight = np.array([1.5, 2.0])
      result = cce_obj(y_true, y_pred, sample_weight=sample_weight)
      self.assertAllClose(result, 1.338, atol=1e-3)
  
imports: import numpy
  from keras import metrics
  from keras import testing
label_desc: Use image node_id 4 for calling the CategoricalCrossentropyTest obj's underlying member method code with example usage: obj.test_weighted() without return types