class_docstr: Proxy class for evaluation function.
class_docstr_tok: ["Proxy","class","for","evaluation","function","."]
docstr: Call passed function with appropriate arguments.
  
  Parameters
  ----------
  preds : numpy 1-D array of shape = [n_samples] or numpy 2-D array of shape = [n_samples, n_classes] (for multi-class task)
      The predicted values.
  dataset : Dataset
      The training dataset.
  
  Returns
  -------
  eval_name : str
      The name of evaluation function (without whitespace).
  eval_result : float
      The eval result.
  is_higher_better : bool
      Is eval result higher better, e.g. AUC is ``is_higher_better``.
code: def __call__(
      self, preds: np.ndarray, dataset: Dataset
  ) -> Union[
      _LGBM_EvalFunctionResultType, List[_LGBM_EvalFunctionResultType]
  ]:
      """Call passed function with appropriate arguments.
  
      Parameters
      ----------
      preds : numpy 1-D array of shape = [n_samples] or numpy 2-D array of shape = [n_samples, n_classes] (for multi-class task)
          The predicted values.
      dataset : Dataset
          The training dataset.
  
      Returns
      -------
      eval_name : str
          The name of evaluation function (without whitespace).
      eval_result : float
          The eval result.
      is_higher_better : bool
          Is eval result higher better, e.g. AUC is ``is_higher_better``.
      """
      labels = _get_label_from_constructed_dataset(dataset)
      argc = len(signature(self.func).parameters)
      if argc == 2:
          return self.func(labels, preds)  # type: ignore[call-arg]
  
      weight = _get_weight_from_constructed_dataset(dataset)
      if argc == 3:
          return self.func(labels, preds, weight)  # type: ignore[call-arg]
  
      if argc == 4:
          group = _get_group_from_constructed_dataset(dataset)
          return self.func(labels, preds, weight, group)  # type: ignore[call-arg]
  
      raise TypeError(
          f"Self-defined eval function should have 2, 3 or 4 arguments, got {argc}"
      )
  
imports: import copy
  from inspect import signature
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import scipy.sparse
  from .basic import Booster, Dataset, LightGBMError, _choose_param_value, _ConfigAliases, _LGBM_BoosterBestScoreType, _LGBM_CategoricalFeatureConfiguration, _LGBM_EvalFunctionResultType, _LGBM_FeatureNameConfiguration, _LGBM_GroupType, _LGBM_InitScoreType, _LGBM_LabelType, _LGBM_WeightType, _log_warning
  from .callback import _EvalResultDict, record_evaluation
  from .compat import SKLEARN_INSTALLED, LGBMNotFittedError, _LGBMAssertAllFinite, _LGBMCheckArray, _LGBMCheckClassificationTargets, _LGBMCheckSampleWeight, _LGBMCheckXY, _LGBMClassifierBase, _LGBMComputeSampleWeight, _LGBMCpuCount, _LGBMLabelEncoder, _LGBMModelBase, _LGBMRegressorBase, dt_DataTable, np_random_Generator, pd_DataFrame
  from .engine import train
label_desc: Use image node_id 2 for calling the _EvalFunctionWrapper obj's underlying member method code with example usage: obj.__call__(preds, dataset) and returns: self, self, self