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.
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())
      self.it += 1
      return 1
  
imports: import json
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
  from xgboost.testing.data import run_base_margin_info
label_desc: Use image node_id 7 for calling the IterForDMatrixTest obj's underlying member method code with example usage: obj.next(input_data) and returns: int, int