code: def test_inverse_mapping(self):
      reader = get_label_reader()
      sampler = ResizeSampler(
          reader=reader,
          window_sizes=MOD_LABEL_DATA,
          batch_size=1,
          shuffle=False,
          queue_length=50,
      )
      aggregator = ResizeSamplesAggregator(
          image_reader=reader,
          name="label",
          output_path=os.path.join("testing_data", "aggregated"),
          interp_order=0,
      )
      more_batch = True
  
      with self.cached_session() as sess:
          sampler.set_num_threads(2)
          while more_batch:
              try:
                  out = sess.run(sampler.pop_batch_op())
              except tf.errors.OutOfRangeError:
                  break
              more_batch = aggregator.decode_batch(
                  {"window_label": out["label"]}, out["label_location"]
              )
      output_filename = "window_label_{}_niftynet_out.nii.gz".format(
          sampler.reader.get_subject_id(0)
      )
      output_file = os.path.join(
          "testing_data", "aggregated", output_filename
      )
      self.assertAllClose(nib.load(output_file).shape, [256, 168, 256])
      sampler.close_all()
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import nibabel
  import numpy
  import pandas
  import tensorflow
  from niftynet.engine.sampler_resize_v2 import ResizeSampler
  from niftynet.engine.windows_aggregator_resize import ResizeSamplesAggregator
  from niftynet.io.image_reader import ImageReader
  from niftynet.io.image_sets_partitioner import ImageSetsPartitioner
  from niftynet.layer.discrete_label_normalisation import DiscreteLabelNormalisationLayer
  from niftynet.layer.pad import PadLayer
  from niftynet.utilities.util_common import ParserNamespace
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 11 for calling the ResizeSamplesAggregatorTest obj's underlying member method code with example usage: obj.test_inverse_mapping() without return types