def test_smoothing_dice_loss(
    features: torch.Tensor,
    targets: torch.Tensor,
    mode: str,
    weights: List[int],
    true_value: float,
):
    """
    Test smoothing dice loss

    Args:
        features: features of objects
        targets: targets of objects
        mode: aggeragation type
        weights: label weights
        true_value: expected loss value
    """
    criterion = SmoothingDiceLoss(mode=mode, weights=weights)
    value = criterion(features, targets).item()
    assert np.isclose(value, true_value)

    Test smoothing dice loss

    Args:
        features: features of objects
        targets: targets of objects
        mode: aggeragation type
        weights: label weights
        true_value: expected loss value
    
tests/contrib/nn/test_criterion.py