code: def mean_absolute_percentage_error(
      preds: Tensor, target: Tensor
  ) -> Tensor:
      """Compute mean absolute percentage error.
  
      Args:
          preds: estimated labels
          target: ground truth labels
  
      Return:
          Tensor with MAPE
  
      Note:
          The epsilon value is taken from `scikit-learn's implementation of MAPE`_.
  
      Example:
          >>> from torchmetrics.functional.regression import mean_absolute_percentage_error
          >>> target = torch.tensor([1, 10, 1e6])
          >>> preds = torch.tensor([0.9, 15, 1.2e6])
          >>> mean_absolute_percentage_error(preds, target)
          tensor(0.2667)
  
      """
      (
          sum_abs_per_error,
          num_obs,
      ) = _mean_absolute_percentage_error_update(preds, target)
      return _mean_absolute_percentage_error_compute(
          sum_abs_per_error, num_obs
      )
  
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_absolute_percentage_error(preds, target) and returns: _mean_absolute_percentage_error_compute