code: def test_data_iterator(
      n_samples_per_batch: int,
      n_features: int,
      n_batches: int,
      subsample: bool,
  ) -> None:
      run_data_iterator(
          n_samples_per_batch,
          n_features,
          n_batches,
          "approx",
          subsample,
          False,
      )
      run_data_iterator(
          n_samples_per_batch,
          n_features,
          n_batches,
          "hist",
          subsample,
          False,
      )
  
imports: import os
  import tempfile
  import weakref
  from typing import Any, Callable, Dict, List
  import numpy
  import pytest
  from hypothesis import given, settings, strategies
  from scipy.sparse import csr_matrix
  import xgboost
  from xgboost import testing
  from xgboost.data import SingleBatchInternalIter
  from xgboost.testing import IteratorForTest, make_batches, non_increasing
label_desc: Use image node_id 3 for calling a global function with example usage: test_data_iterator(n_samples_per_batch, n_features, n_batches, subsample) without return types