code: def train_breast_cancer_cv(config: dict):
      # This is a simple training function to be passed into Tune, using
      # lightgbm's cross validation functionality
  
      # Load dataset
      data, target = sklearn.datasets.load_breast_cancer(
          return_X_y=True
      )
  
      train_set = lgb.Dataset(data, label=target)
  
      # Run CV, using the Tune callback
      lgb.cv(
          config,
          train_set,
          verbose_eval=False,
          stratified=True,
          # Checkpointing is not supported for CV
          # LightGBM aggregates metrics over folds automatically
          # with the cv_agg key. Both mean and standard deviation
          # are provided.
          callbacks=[
              TuneReportCheckpointCallback(
                  {
                      "binary_error": "cv_agg-binary_error-mean",
                      "binary_logloss": "cv_agg-binary_logloss-mean",
                      "binary_error_stdv": "cv_agg-binary_error-stdv",
                      "binary_logloss_stdv": "cv_agg-binary_logloss-stdv",
                  },
                  frequency=0,
              )
          ],
      )
  
file_path: ray/python/ray/tune/examples/lightgbm_example.py
imports: import lightgbm
  import sklearn.datasets
  import sklearn.metrics
  from sklearn.model_selection import train_test_split
  from ray import tune
  from ray.tune.schedulers import ASHAScheduler
  from ray.tune.integration.lightgbm import TuneReportCheckpointCallback
label_desc: Use image node_id 2 for calling a global function with example usage: train_breast_cancer_cv(config) without return types