code: def mean_squared_error(
      preds: Tensor,
      target: Tensor,
      squared: bool = True,
      num_outputs: int = 1,
  ) -> Tensor:
      """Compute mean squared error.
  
      Args:
          preds: estimated labels
          target: ground truth labels
          squared: returns RMSE value if set to False
          num_outputs: Number of outputs in multioutput setting
  
      Return:
          Tensor with MSE
  
      Example:
          >>> from torchmetrics.functional.regression import mean_squared_error
          >>> x = torch.tensor([0., 1, 2, 3])
          >>> y = torch.tensor([0., 1, 2, 2])
          >>> mean_squared_error(x, y)
          tensor(0.2500)
  
      """
      sum_squared_error, num_obs = _mean_squared_error_update(
          preds, target, num_outputs=num_outputs
      )
      return _mean_squared_error_compute(
          sum_squared_error, num_obs, squared=squared
      )
  
imports: from typing import Tuple, Union
  import torch
  from torch import Tensor
  from torchmetrics.utilities.checks import _check_same_shape
label_desc: Use image node_id 3 for calling a global function with example usage: mean_squared_error(preds, target, squared, num_outputs) and returns: _mean_squared_error_compute