code: def soft_skel(img: torch.Tensor, iter_: int) -> torch.Tensor:
      """
      Perform soft skeletonization on the input image
  
      Adapted from:
         https://github.com/jocpae/clDice/blob/master/cldice_loss/pytorch/soft_skeleton.py#L29
  
      Args:
          img: the shape should be BCH(WD)
          iter_: number of iterations for skeletonization
  
      Returns:
          skeletonized image
      """
      img1 = soft_open(img)
      skel = F.relu(img - img1)
      for _ in range(iter_):
          img = soft_erode(img)
          img1 = soft_open(img)
          delta = F.relu(img - img1)
          skel = skel + F.relu(delta - skel * delta)
      return skel
  
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 4 for calling a global function with example usage: soft_skel(img, iter_) and returns: skel