def METHOD_NAME(self, y_pred: torch.Tensor, y: torch.Tensor | None = None, **kwargs: Any) -> TensorOrList:
    """
    Input `y_pred` is compared with ground truth `y`.
    Both `y_pred` and `y` are expected to be a batch-first Tensor (BC[HWD]).
    Returns:
         a tensor with shape (BC[HWD]), or a list of tensors, each tensor with shape (C[HWD]).
    """
    iter_loss: TensorOrList = self.loss_fn(y_pred) if y is None else self.loss_fn(y_pred, y)
    if isinstance(iter_loss, torch.Tensor):
        while iter_loss.dim() < 2:
            iter_loss = iter_loss[None]
    # to be compatible with `Cumulative`, iter_loss should at least have a batch dim.
    # to be compatible with `do_metric_reduction`, iter_loss should at least have a batch and a channel dim.
    return iter_loss