code: def update(self, output: Tuple[torch.Tensor, torch.Tensor]) -> None:
      _check_output_shapes(output)
      _check_output_types(output)
      y_pred, y = output[0].detach(), output[1].detach()
  
      if y_pred.ndimension() == 2 and y_pred.shape[1] == 1:
          y_pred = y_pred.squeeze(dim=-1)
  
      if y.ndimension() == 2 and y.shape[1] == 1:
          y = y.squeeze(dim=-1)
  
      self._update((y_pred, y))
  
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 the _BaseRegression obj's underlying member method code with example usage: obj.update(output) without return types