code: def _check_output_shapes(
      output: Tuple[torch.Tensor, torch.Tensor]
  ) -> None:
      y_pred, y = output
      c1 = y_pred.ndimension() == 2 and y_pred.shape[1] == 1
      if not (y_pred.ndimension() == 1 or c1):
          raise ValueError(
              f"Input y_pred should have shape (N,) or (N, 1), but given {y_pred.shape}"
          )
  
      c2 = y.ndimension() == 2 and y.shape[1] == 1
      if not (y.ndimension() == 1 or c2):
          raise ValueError(
              f"Input y should have shape (N,) or (N, 1), but given {y.shape}"
          )
  
      if y_pred.shape != y.shape:
          raise ValueError(
              f"Input data shapes should be the same, but given {y_pred.shape} and {y.shape}"
          )
  
file_path: ignite/ignite/contrib/metrics/regression/_base.py
imports: from abc import abstractmethod
  from typing import Tuple
  import torch
  from ignite.metrics import Metric
  from ignite.metrics.metric import reinit__is_reduced
label_desc: Use image node_id 1 for calling a global function with example usage: _check_output_shapes(output) without return types