code: def soft_open(img: torch.Tensor) -> torch.Tensor:
      """
      Wrapper function to perform soft opening on the input image
  
      Args:
          img: the shape should be BCH(WD)
  
      Adapted from:
          https://github.com/jocpae/clDice/blob/master/cldice_loss/pytorch/soft_skeleton.py#L25
      """
      eroded_image = soft_erode(img)
      dilated_image = soft_dilate(eroded_image)
      return dilated_image
  
file_path: MONAI/monai/losses/cldice.py
imports: from __future__ import annotations
  import torch
  import torch.nn.functional
  from torch.nn.modules.loss import _Loss
label_desc: Use image node_id 3 for calling a global function with example usage: soft_open(img) and returns: dilated_image