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: Utility function for obtaining current batch of label.
docstr_tok: ["Utility","function","for","obtaining","current","batch","of","label","."]
code: def labels(self):
      """Utility function for obtaining current batch of label."""
      return self._labels[self.it]
  
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 5 for calling the IterForDMatrixTest obj's underlying member method code with example usage: obj.labels() and returns: self