code: def dice_loss(
      x: torch.Tensor,
      target: torch.Tensor,
      multiclass: bool = False,
      ignore_index: int = -100,
  ):
      # Dice loss (objective to minimize) between 0 and 1
      x = nn.functional.softmax(x, dim=1)
      fn = multiclass_dice_coeff if multiclass else dice_coeff
      return 1 - fn(x, target, ignore_index=ignore_index)
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 4 for calling a global function with example usage: dice_loss(x, target, multiclass, ignore_index) and returns: unknown