class_docstr: Internal class to handle `wandb_callback` logic.
  
  This callback is adapted form the LightGBM's `_RecordEvaluationCallback`.
class_docstr_tok: ["Internal","class","to","handle","`","wandb_callback","`","logic",".","This","callback","is","adapted","form","the","LightGBM","'s","`","_RecordEvaluationCallback","`","."]
code: def __call__(self, env: "CallbackEnv") -> None:
      if env.iteration == env.begin_iteration:  # type: ignore
          self._init(env)
  
      for item in env.evaluation_result_list:
          if len(item) == 4:
              data_name, eval_name, result = item[:3]
              wandb.log(
                  {data_name + "_" + eval_name: result},
                  commit=False,
              )
          else:
              data_name, eval_name = item[1].split()
              res_mean = item[2]
              res_stdv = item[4]
              wandb.log(
                  {
                      data_name + "_" + eval_name + "-mean": res_mean,
                      data_name + "_" + eval_name + "-stdv": res_stdv,
                  },
                  commit=False,
              )
  
      # call `commit=True` to log the data as a single W&B step.
      wandb.log({"iteration": env.iteration}, commit=True)
  
file_path: wandb/wandb/integration/lightgbm/__init__.py
imports: from pathlib import Path
  from typing import TYPE_CHECKING, Callable
  import lightgbm
  from lightgbm import Booster
  import wandb
  from wandb.sdk.lib import telemetry
label_desc: Use image node_id 3 for calling the _WandbCallback obj's underlying member method code with example usage: obj.__call__(env) without return types