code: def __init__(self, globals_dict: dict) -> None:
      def mean_absolute_percentage_error(
          y_true,
          y_pred,
          sample_weight=None,
          multioutput="uniform_average",
      ):
          y_type, y_true, y_pred, multioutput = _check_reg_targets(
              y_true, y_pred, multioutput
          )
          check_consistent_length(y_true, y_pred, sample_weight)
          mask = y_true != 0
          y_true = y_true[mask]
          y_pred = y_pred[mask]
          mape = np.abs(y_pred - y_true) / np.abs(y_true)
          output_errors = np.average(
              mape, weights=sample_weight, axis=0
          )
          if isinstance(multioutput, str):
              if multioutput == "raw_values":
                  return output_errors
              elif multioutput == "uniform_average":
                  # pass None as weights to np.average: uniform mean
                  multioutput = None
  
          return np.average(output_errors, weights=multioutput)
  
      super().__init__(
          id="mape",
          name="MAPE",
          score_func=mean_absolute_percentage_error,
          greater_is_better=False,
      )
  
imports: from typing import Any, Dict, Optional, Union
  import numpy
  from sklearn import metrics
  from sklearn.metrics._regression import _check_reg_targets
  from sklearn.metrics._scorer import _BaseScorer
  from sklearn.utils.validation import check_consistent_length
  import pycaret.containers.base_container
  import pycaret.internal.metrics
  from pycaret.containers.metrics.base_metric import MetricContainer
label_desc: Use image node_id 1 to create a new MAPEMetricContainer object from inherited base classes: RegressionMetricContainer with example: obj = MAPEMetricContainer(globals_dict)