code: def train_breast_cancer(config: dict):
      # This is a simple training function to be passed into Tune
  
      # Load dataset
      data, labels = sklearn.datasets.load_breast_cancer(
          return_X_y=True
      )
  
      # Split into train and test set
      train_x, test_x, train_y, test_y = train_test_split(
          data, labels, test_size=0.25
      )
      # Build input matrices for XGBoost
      train_set = xgb.DMatrix(train_x, label=train_y)
      test_set = xgb.DMatrix(test_x, label=test_y)
  
      # Train the classifier, using the Tune callback
      xgb.train(
          config,
          train_set,
          evals=[(test_set, "test")],
          verbose_eval=False,
          callbacks=[
              TuneReportCheckpointCallback(
                  filename="model.xgb", frequency=1
              )
          ],
      )
  
file_path: ray/python/ray/tune/examples/xgboost_example.py
imports: from typing import Dict, List
  import sklearn.datasets
  import sklearn.metrics
  import os
  import numpy
  from sklearn.model_selection import train_test_split
  import xgboost
  import ray
  from ray import tune
  from ray.tune.schedulers import ASHAScheduler
  from ray.tune.integration.xgboost import TuneReportCheckpointCallback
label_desc: Use image node_id 1 for calling a global function with example usage: train_breast_cancer(config) without return types