code: def test_zero_weighted():
      cl_obj = contrastive.ContrastiveLoss()
      y_true = tf.constant([0, 0, 1, 1, 0, 1], dtype=tf.dtypes.int64)
      y_pred = tf.constant(
          [0.1, 0.3, 1.3, 0.7, 1.1, 0.5], dtype=tf.dtypes.float32
      )
      loss = cl_obj(y_true, y_pred, sample_weight=0.0)
      np.testing.assert_allclose(loss, 0.0)
  
file_path: addons/tensorflow_addons/losses/tests/contrastive_test.py
imports: import numpy
  import tensorflow
  from tensorflow_addons.losses import contrastive
label_desc: Use image node_id 7 for calling a global function with example usage: test_zero_weighted() without return types