class_docstr: Wrapper to handle both encoded and decoded labels.
class_docstr_tok: ["Wrapper","to","handle","both","encoded","and","decoded","labels","."]
code: def __call__(self, y_true, y_pred, **kwargs):
      if self.labels and _safe_indexing(y_true, 0) in self.labels:
          kwargs["labels"] = self.labels
          kwargs["pos_label"] = self.labels[-1]
      return self.score_func(y_true, y_pred, **kwargs)
  
imports: import traceback
  import warnings
  from typing import Callable
  import numpy
  from sklearn.exceptions import FitFailedWarning
  from sklearn.metrics._scorer import _PredictScorer, _ProbaScorer, _ThresholdScorer
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils import _safe_indexing
  from pycaret.utils.generic import get_label_encoder
label_desc: Use image node_id 2 for calling the EncodedDecodedLabelsScoreFunc obj's underlying member method code with example usage: obj.__call__(y_true, y_pred) and returns: self