code: def main(client):
      # generate some random data for demonstration
      n = 100
      m = 1000000
      partition_size = 10000
      X = da.random.random((m, n), partition_size)
      y = da.random.random(m, partition_size)
  
      regressor = dxgb.DaskXGBRegressor(verbosity=1)
      # set the device to CUDA
      regressor.set_params(tree_method="hist", device="cuda")
      # assigning client here is optional
      regressor.client = client
  
      regressor.fit(X, y, eval_set=[(X, y)])
      prediction = regressor.predict(X)
  
      bst = regressor.get_booster()
      history = regressor.evals_result()
  
      print("Evaluation history:", history)
      # returned prediction is always a dask array.
      assert isinstance(prediction, da.Array)
      return bst
  
imports: from dask import array
  from dask.distributed import Client
  from dask_cuda import LocalCUDACluster
  from xgboost import dask
label_desc: Use image node_id 1 for calling a global function with example usage: main(client) and returns: bst