code: def _asymmetric_error(
      y_true,
      y_pred,
      asymmetric_threshold=0.0,
      left_error_function="squared",
      right_error_function="absolute",
      left_error_penalty=1.0,
      right_error_penalty=1.0,
  ):
      """Calculate asymmetric error.
  
      Parameters
      ----------
      y_true : pd.Series, pd.DataFrame or np.array of shape (fh,) or (fh, n_outputs) \
               where fh is the forecasting horizon
          Ground truth (correct) target values.
      y_pred : pd.Series, pd.DataFrame or np.array of shape (fh,) or (fh, n_outputs) \
               where fh is the forecasting horizon
          Forecasted values.
      asymmetric_threshold : float, default = 0.0
          The value used to threshold the asymmetric loss function. Error values
          that are less than the asymmetric threshold have `left_error_function`
          applied. Error values greater than or equal to asymmetric threshold
          have `right_error_function` applied.
      left_error_function : {'squared', 'absolute'}, default='squared'
          Loss penalty to apply to error values less than the asymmetric threshold.
      right_error_function : {'squared', 'absolute'}, default='absolute'
          Loss penalty to apply to error values greater than or equal to the
          asymmetric threshold.
      left_error_penalty : int or float, default=1.0
          An additional multiplicative penalty to apply to error values less than
          the asymmetric threshold.
      right_error_penalty : int or float, default=1.0
          An additional multiplicative penalty to apply to error values greater
          than the asymmetric threshold.
  
      Returns
      -------
      asymmetric_errors : float
          Array of asymmetric errors.
  
      References
      ----------
      Hyndman, R. J and Koehler, A. B. (2006). "Another look at measures of
      forecast accuracy", International Journal of Forecasting, Volume 22, Issue 4.
  
      Diebold, Francis X. (2007). "Elements of Forecasting (4th ed.)",
      Thomson, South-Western: Ohio, US.
      """
      functions = {"squared": np.square, "absolute": np.abs}
      left_func, right_func = (
          functions[left_error_function],
          functions[right_error_function],
      )
  
      if not (
          isinstance(left_error_penalty, (int, float))
          and isinstance(right_error_penalty, (int, float))
      ):
          msg = "`left_error_penalty` and `right_error_penalty` must be int or float."
          raise ValueError(msg)
  
      errors = np.where(
          y_true - y_pred < asymmetric_threshold,
          left_error_penalty * left_func(y_true - y_pred),
          right_error_penalty * right_func(y_true - y_pred),
      )
      return errors
  
imports: import numpy
  from scipy.stats import gmean
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import median_absolute_error
  from sklearn.metrics._regression import _check_reg_targets
  from sklearn.utils.stats import _weighted_percentile
  from sklearn.utils.validation import check_consistent_length
  from sktime.utils.stats import _weighted_geometric_mean
label_desc: Use image node_id 23 for calling a global function with example usage: _asymmetric_error(y_true, y_pred, asymmetric_threshold, left_error_function, right_error_function, left_error_penalty, right_error_penalty) and returns: errors