code: def test_windows_per_image(self):
      sampler = ImageWindowDataset(
          reader=get_2d_reader(), batch_size=2, windows_per_image=2
      )
      self.assert_window(sampler())
  
imports: from __future__ import absolute_import, print_function
  import os
  import numpy
  import tensorflow
  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 7 for calling the ImageWindowDataset_2D_Test obj's underlying member method code with example usage: obj.test_windows_per_image() without return types