class_docstr: Internal record evaluation callable class.
class_docstr_tok: ["Internal","record","evaluation","callable","class","."]
code: def __call__(self, env: CallbackEnv) -> None:
      if env.iteration == env.begin_iteration:
          self._init(env)
      if env.evaluation_result_list is None:
          raise RuntimeError(
              "record_evaluation() callback enabled but no evaluation results found. This is a probably bug in LightGBM. "
              "Please report it at https://github.com/microsoft/LightGBM/issues"
          )
      for item in env.evaluation_result_list:
          if len(item) == 4:
              data_name, eval_name, result = item[:3]
              self.eval_result[data_name][eval_name].append(result)
          else:
              data_name, eval_name = item[1].split()
              res_mean = item[2]
              res_stdv = item[4]  # type: ignore[misc]
              self.eval_result[data_name][f"{eval_name}-mean"].append(
                  res_mean
              )
              self.eval_result[data_name][f"{eval_name}-stdv"].append(
                  res_stdv
              )
  
imports: from collections import OrderedDict
  from dataclasses import dataclass
  from functools import partial
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
  from .basic import Booster, _ConfigAliases, _LGBM_BoosterEvalMethodResultType, _LGBM_BoosterEvalMethodResultWithStandardDeviationType, _log_info, _log_warning
label_desc: Use image node_id 3 for calling the _RecordEvaluationCallback obj's underlying member method code with example usage: obj.__call__(env) without return types