class_docstr: Wrapper class around the main loss function to accept a list of tensors returned from a deeply
  supervised networks. The final loss is computed as the sum of weighted losses for each of deep supervision levels.
docstr: Calculates a loss output accounting for differences in shapes,
  and downsizing targets if necessary (using nearest neighbor interpolation)
  Generally downsizing occurs for all level, except for the first (level==0)
code: def get_loss(
      self, input: torch.Tensor, target: torch.Tensor
  ) -> torch.Tensor:
      """
      Calculates a loss output accounting for differences in shapes,
      and downsizing targets if necessary (using nearest neighbor interpolation)
      Generally downsizing occurs for all level, except for the first (level==0)
      """
      if input.shape[2:] != target.shape[2:]:
          target = F.interpolate(
              target, size=input.shape[2:], mode=self.interp_mode
          )
      return self.loss(input, target)
  
file_path: MONAI/monai/losses/ds_loss.py
imports: from __future__ import annotations
  from typing import Union
  import torch
  import torch.nn.functional
  from torch.nn.modules.loss import _Loss
  from monai.utils import pytorch_after
label_desc: Use image node_id 3 for calling the DeepSupervisionLoss obj's underlying member method code with example usage: obj.get_loss(input, target) and returns: self