code: def xgboost_train(config, ray_params, num_boost_round=200):
      train_set = RayDMatrix(
          os.path.expanduser("/data/train.parquet"), "labels"
      )
      test_set = RayDMatrix(
          os.path.expanduser("/data/test.parquet"), "labels"
      )
  
      evals_result = {}
  
      bst = train(
          params=config,
          dtrain=train_set,
          evals=[(test_set, "eval")],
          evals_result=evals_result,
          ray_params=ray_params,
          verbose_eval=False,
          num_boost_round=num_boost_round,
      )
  
      model_path = "tuned.xgb"
      bst.save_model(model_path)
      print(
          "Final validation error: {:.4f}".format(
              evals_result["eval"]["error"][-1]
          )
      )
  
file_path: ray/release/tune_tests/scalability_tests/workloads/test_xgboost_sweep.py
imports: from collections import Counter
  import json
  import os
  import time
  import ray
  from ray import tune
  from xgboost_ray import train, RayParams, RayDMatrix
label_desc: Use image node_id 1 for calling a global function with example usage: xgboost_train(config, ray_params, num_boost_round) without return types