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 _init(self, env: "CallbackEnv") -> None:
      with wb_telemetry.context() as tel:
          tel.feature.lightgbm_wandb_callback = True
  
      # log the params as W&B config.
      if self.log_params:
          wandb.config.update(env.params)
  
      # use `define_metric` to set the wandb summary to the best metric value.
      for item in env.evaluation_result_list:
          if self.define_metric_bool:
              if len(item) == 4:
                  data_name, eval_name = item[:2]
                  _define_metric(data_name, eval_name)
              else:
                  data_name, eval_name = item[1].split()
                  _define_metric(data_name, f"{eval_name}-mean")
                  _define_metric(data_name, f"{eval_name}-stdv")
  
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 2 for calling the _WandbCallback obj's underlying member method code with example usage: obj._init(env) without return types