class_docstr: Multi-class Dice Coefficient for Semantic Segmentation
  
  Calculates Dice Coefficient for semantic segmentation (multi-class tasks).
  
  Heaviliy inspired by fastai's implementation:  Implement multi-class version following https://github.com/fastai/fastai/blob/594e1cc20068b0d99bfc30bfe6dac88ab381a157/fastai/metrics.py#L343
  
  # Arguments
      classes_to_exclude: A list of class names to exclude from metric computation
code: def finalize(self) -> Dict[str, float]:
      class_dice_scores = np.array([])
  
      for c in self._intersection:
          class_dice_scores = np.append(
              class_dice_scores,
              2.0 * self._intersection[c] / self._union[c]
              if self._union[c] > 0
              else np.nan,
          )
  
      dice = np.nanmean(class_dice_scores)
  
      self._reset()
      return {"dummy_value_for_fastai": dice}
  
file_path: icevision/icevision/metrics/dice_coefficient/multiclass_dice_coefficient.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.data import *
  from icevision.metrics.metric import *
label_desc: Use image node_id 4 for calling the MulticlassDiceCoefficient obj's underlying member method code with example usage: obj.finalize() and returns: dict