def METHOD_NAME(self, output: Tuple[torch.Tensor, torch.Tensor]) -> None:
    y_pred, y = output
    if y_pred.ndimension() not in (1, 2):
        raise ValueError("Predictions should be of shape (batch_size, n_targets) or (batch_size, ).")
    if y.ndimension() not in (1, 2):
        raise ValueError("Targets should be of shape (batch_size, n_targets) or (batch_size, ).")