code: def wandb_callback() -> "Callable":
      """Old style callback that will be deprecated in favor of WandbCallback. Please try the new logger for more features."""
      warnings.warn(
          "wandb_callback will be deprecated in favor of WandbCallback. Please use WandbCallback for more features.",
          UserWarning,
          stacklevel=2,
      )
  
      with wb_telemetry.context() as tel:
          tel.feature.xgboost_old_wandb_callback = True
  
      def callback(env: "CallbackEnv") -> None:
          for k, v in env.evaluation_result_list:
              wandb.log({k: v}, commit=False)
          wandb.log({})
  
      return callback
  
file_path: wandb/wandb/integration/xgboost/xgboost.py
imports: import json
  import warnings
  from pathlib import Path
  from typing import TYPE_CHECKING, cast
  import xgboost
  from xgboost import Booster
  import wandb
  from wandb.sdk.lib import telemetry
label_desc: Use image node_id 1 for calling a global function with example usage: wandb_callback() and returns: callback