code: def run_dataset(self, n_iters, n_threads, **kwargs):
      sampler = ImageWindowGenerator(**kwargs)
      sampler.set_num_threads(n_threads)
      with self.cached_session() as sess:
          true_iters = 0
          next_element = sampler.pop_batch_op()
          windows = []
          try:
              for _ in range(min(n_iters, 100)):
                  windows.append(sess.run(next_element)["mr_location"])
                  true_iters = true_iters + 1
          except (tf.errors.OutOfRangeError, EOFError):
              pass
          assert (
              true_iters <= 100
          ), "keep the test smaller than 100 iters"
      return true_iters, np.concatenate(windows, 0)
  
imports: from __future__ import absolute_import, print_function
  import os
  import unittest
  import numpy
  import tensorflow
  from niftynet.engine.image_window import N_SPATIAL, LOCATION_FORMAT
  from niftynet.engine.image_window_dataset import ImageWindowDataset
  from niftynet.io.image_reader import ImageReader
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the ImageDatasetParamTest obj's underlying member method code with example usage: obj.run_dataset(n_iters, n_threads) and returns: true_iters,  np