code: def main(client):
      # generate some random data for demonstration
      m = 100000
      n = 100
      X = da.random.random(size=(m, n), chunks=100)
      y = da.random.random(size=(m,), chunks=100)
  
      # DaskDMatrix acts like normal DMatrix, works as a proxy for local
      # DMatrix scatter around workers.
      dtrain = DaskDMatrix(client, X, y)
  
      # Use train method from xgboost.dask instead of xgboost.  This
      # distributed version of train returns a dictionary containing the
      # resulting booster and evaluation history obtained from
      # evaluation metrics.
      output = dxgb.train(
          client,
          {"verbosity": 1, "tree_method": "hist"},
          dtrain,
          num_boost_round=4,
          evals=[(dtrain, "train")],
      )
      bst = output["booster"]
      history = output["history"]
  
      # you can pass output directly into `predict` too.
      prediction = dxgb.predict(client, bst, dtrain)
      print("Evaluation history:", history)
      return prediction
  
imports: from dask import array
  from dask.distributed import Client, LocalCluster
  from xgboost import dask
  from xgboost.dask import DaskDMatrix
label_desc: Use image node_id 1 for calling a global function with example usage: main(client) and returns: prediction