class_docstr: A data iterator for XGBoost DMatrix.
  
  `reset` and `next` are required for any data iterator, other functions here
  are utilites for demonstration's purpose.
class_docstr_tok: ["A","data","iterator","for","XGBoost","DMatrix",".","`","reset","`","and","`","next","`","are","required","for","any","data","iterator",",","other","functions","here","are","utilites","for","demonstration","'s","purpose","."]
docstr: Yield next batch of data.
docstr_tok: ["Yield","next","batch","of","data","."]
code: def next(self, input_data):
      """Yield next batch of data."""
      if self.it == len(self._data):
          # Return 0 when there's no more batch.
          return 0
      input_data(
          data=self.data(), label=self.labels(), weight=self.weights()
      )
      self.it += 1
      return 1
  
file_path: xgboost/demo/guide-python/quantile_data_iterator.py
imports: import cupy
  import numpy
  import xgboost
label_desc: Use image node_id 9 for calling the IterForDMatrixDemo obj's underlying member method code with example usage: obj.next(input_data) and returns: int, int