code: def _sk_weighted_mean_abs_percentage_error(target, preds):
      return np.sum(np.abs(target - preds)) / np.sum(np.abs(target))
  
imports: import math
  from functools import partial
  from typing import Optional
  import numpy
  import pytest
  import torch
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_absolute_percentage_error
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import mean_squared_log_error
  from sklearn.metrics._regression import _check_reg_targets
  from sklearn.utils import check_consistent_length
  from torchmetrics.functional import mean_absolute_error, mean_absolute_percentage_error, mean_squared_error, mean_squared_log_error, weighted_mean_absolute_percentage_error
  from torchmetrics.functional.regression.symmetric_mape import symmetric_mean_absolute_percentage_error
  from torchmetrics.regression import MeanAbsoluteError, MeanAbsolutePercentageError, MeanSquaredError, MeanSquaredLogError, WeightedMeanAbsolutePercentageError
  from torchmetrics.regression.symmetric_mape import SymmetricMeanAbsolutePercentageError
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling a global function with example usage: _sk_weighted_mean_abs_percentage_error(target, preds) and returns: unknown