code: def test_dice_loss(case):
      gt, pr, res = case
      gt = _to_4d(gt)
      pr = _to_4d(pr)
      dice_loss = DiceLoss(smooth=10e-12)
      score = keras.backend.eval(dice_loss(gt, pr))
      assert np.allclose(score, 1 - res)
  
file_path: segmentation_models/tests/test_metrics.py
imports: import pytest
  import numpy
  import segmentation_models
  from segmentation_models.metrics import IOUScore, FScore
  from segmentation_models.losses import JaccardLoss, DiceLoss
label_desc: Use image node_id 8 for calling a global function with example usage: test_dice_loss(case) without return types