docstr: Train an XGBoost ranking model
docstr_tok: ["Train","an","XGBoost","ranking","model"]
code: def test_training(self):
      """
      Train an XGBoost ranking model
      """
      # specify validations set to watch performance
      watchlist = [(self.dtest, "eval"), (self.dtrain, "train")]
      bst = xgboost.train(
          self.params,
          self.dtrain,
          num_boost_round=2500,
          early_stopping_rounds=10,
          evals=watchlist,
      )
      assert bst.best_score > 0.98
  
imports: import itertools
  import json
  import os
  import shutil
  from typing import Optional
  import numpy
  import pytest
  from hypothesis import given, note, settings
  from scipy.sparse import csr_matrix
  import xgboost
  from xgboost import testing
  from xgboost.testing.data import RelDataCV, simulate_clicks, sort_ltr_samples
  from xgboost.testing.params import lambdarank_parameter_strategy
label_desc: Use image node_id 3 for calling the TestRanking obj's underlying member method code with example usage: obj.test_training() without return types