code: def xgb_progressbar(rounds=1000):
      
      pbar = tqdm(total=rounds)
  
      def callback(_, ):
          pbar.update(1)
  
      return callback
docs: Progressbar for xgboost using tqdm library.
  
      Examples
      --------
  
      >>> model = xgb.train(params, X_train, 1000, callbacks=[xgb_progress(1000), ])