code: def get_scorer_name(scorer) -> str:
      """Get scorer name from a scorer."""
      if isinstance(scorer, str):
          return (
              scorer[: scorer.index("_per_class")]
              if scorer.endswith("_per_class")
              else scorer
          )
      if hasattr(scorer, "__name__"):
          return scorer.__name__
      if isinstance(scorer, _BaseScorer):
          return (
              scorer._score_func.__name__
          )  # pylint: disable=protected-access
      return type(scorer).__name__
  
file_path: deepchecks/deepchecks/utils/metrics.py
imports: from typing import Union
  import numpy
  import pandas
  from sklearn.metrics._scorer import _BaseScorer
  from deepchecks.core.errors import DeepchecksValueError
label_desc: Use image node_id 2 for calling a global function with example usage: get_scorer_name(scorer) and returns: type, unknown, scorer, scorer