code: def get_acceptable_classification_metrics(
      label_array: np.ndarray,
  ) -> Set[str]:
      """
      Return acceptable metrics given the unique set of labels being classified.
  
      Parameters
      ----------
      label_array : numpy.ndarray
          A sorted numpy array containing the unique labels
          that we are trying to predict. Optional for regressors
          but required for classifiers.
  
      Returns
      -------
      acceptable_metrics : Set[str]
          A set of metric names that are acceptable
          for the given classification scenario.
      """
      # this is a classifier so the acceptable objective
      # functions definitely include those metrics that
      # are specifically for classification and also
      # the unweighted kappa metrics
      acceptable_metrics = (
          CLASSIFICATION_ONLY_METRICS | UNWEIGHTED_KAPPA_METRICS
      )
  
      # now let us consider which other metrics may also
      # be acceptable depending on whether the labels
      # are strings or (contiguous) integers/floats
      label_type = label_array.dtype.type
  
      # CASE 1: labels are strings, then no other metrics
      # are acceptable
      if issubclass(label_type, (np.object_, str)):
          pass
  
      # CASE 2: labels are integers or floats; the way
      # it works in SKLL, it's guaranteed that
      # class indices will be sorted in the same order
      # as the class labels therefore, ranking metrics
      # such as various correlations should work fine.
      elif issubclass(
          label_type,
          (int, np.int32, np.int64, float, np.float32, np.float64),
      ):
          acceptable_metrics.update(CORRELATION_METRICS)
  
          # CASE 3: labels are numerically contiguous integers
          # this is a special sub-case of CASE 2 which
          # represents ordinal classification. Only in this
          # case, weighted kappas -- where the distance
          # between the class labels has a special
          # meaning -- can be allowed. This is because
          # class indices are always contiguous and all
          # metrics in SKLL are computed in the index
          # space, not the label space. Note that floating
          # point numbers that are equivalent to integers
          # (e.g., [1.0, 2.0, 3.0]) are also acceptable.
          if contiguous_ints_or_floats(label_array):
              acceptable_metrics.update(WEIGHTED_KAPPA_METRICS)
  
      # if there are any user-defined custom metrics registered, include them too
      user_defined_metrics = set(_CUSTOM_METRICS) - set(
          _PREDEFINED_CUSTOM_METRICS
      )
      if len(user_defined_metrics) > 0:
          acceptable_metrics.update(user_defined_metrics)
  
      return acceptable_metrics
  
imports: from __future__ import annotations
  import inspect
  import logging
  import sys
  import time
  from collections import Counter, defaultdict
  from csv import DictWriter, excel_tab
  from functools import wraps
  from importlib import import_module
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Set, Tuple, Type, Union
  import joblib
  import numpy
  import scipy.sparse
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.feature_selection import SelectKBest
  from sklearn.metrics import accuracy_score, confusion_matrix, precision_recall_fscore_support
  from sklearn.model_selection import KFold, LeaveOneGroupOut, ShuffleSplit, StratifiedKFold
  from skll.data import FeatureSet
  from skll.metrics import _CUSTOM_METRICS, _PREDEFINED_CUSTOM_METRICS, use_score_func
  from skll.types import ComputeEvalMetricsResults, ConfusionMatrix, FeaturesetIterator, FoldMapping, IdType, IndexIterator, LabelType, PathOrStr, SparseFeatureMatrix
  from skll.utils.constants import CLASSIFICATION_ONLY_METRICS, CORRELATION_METRICS, REGRESSION_ONLY_METRICS, UNWEIGHTED_KAPPA_METRICS, WEIGHTED_KAPPA_METRICS
  from skll.version import VERSION
label_desc: Use image node_id 5 for calling a global function with example usage: get_acceptable_classification_metrics(label_array) and returns: acceptable_metrics