code: def _handling_alias_metrics(lgbm_params: dict[str, Any]) -> None:
      """Handling alias metrics."""
      if "metric" not in lgbm_params.keys():
          return
  
      if not isinstance(lgbm_params["metric"], (str, Iterable)):
          raise ValueError(
              "The `metric` parameter is expected to be a string or an iterable object, but got "
              f"{type(lgbm_params['metric'])}."
          )
  
      if isinstance(lgbm_params["metric"], str):
          lgbm_params["metric"] = (
              _ALIAS_METRIC_MAP.get(lgbm_params["metric"])
              or lgbm_params["metric"]
          )
          return
  
      canonical_metrics = []
      for metric in lgbm_params["metric"]:
          canonical_metrics.append(
              _ALIAS_METRIC_MAP.get(metric) or metric
          )
      lgbm_params["metric"] = canonical_metrics
  
imports: from __future__ import annotations
  from collections.abc import Iterable
  from typing import Any
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: _handling_alias_metrics(lgbm_params) without return types