code: def dice(logits, labels):
      logits = logits.view(-1)
      labels = labels.view(-1)
      eps = 1e-6
      dice = ((logits * labels).sum() * 2 + eps) / (
          logits.sum() + labels.sum() + eps
      )
      dice_loss = dice.pow(-1)
      return dice_loss
  
imports: import torch.nn.functional
  from .utils import *
  from .backbone import *
label_desc: Use image node_id 1 for calling a global function with example usage: dice(logits, labels) and returns: dice_loss