code: def test_set_spatial_size(self):
      new_shape = (42, 43, 44)
      window = ImageWindow.from_data_reader_properties(
          **get_static_window_param()
      )
      window.placeholders_dict(10)
      window.set_spatial_shape(new_shape)
      self.assertAllClose(
          window.shapes["image"], (10, 42, 43, 44, 1, 2)
      )
      self.assertAllClose(
          window.shapes["label"], (10, 42, 43, 44, 1, 1)
      )
      window.placeholders_dict(10)
  
      self.assertAllEqual(
          window.image_data_placeholder("image").shape.as_list(),
          [10, 42, 43, 44, 1, 2],
      )
      self.assertAllEqual(
          window.image_data_placeholder("image").dtype,
          window.tf_dtypes["image"],
      )
      self.assertAllEqual(
          window.coordinates_placeholder("image").shape.as_list(),
          [10, 7],
      )
      self.assertAllEqual(
          window.coordinates_placeholder("image").dtype, tf.int32
      )
  
      self.assertAllEqual(
          window.image_data_placeholder("label").shape.as_list(),
          [10, 42, 43, 44, 1, 1],
      )
      self.assertAllEqual(
          window.image_data_placeholder("label").dtype,
          window.tf_dtypes["label"],
      )
      self.assertAllEqual(
          window.coordinates_placeholder("label").shape.as_list(),
          [10, 7],
      )
      self.assertAllEqual(
          window.coordinates_placeholder("label").dtype, tf.int32
      )
  
file_path: NiftyNet/tests/image_window_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.engine.image_window import ImageWindow
  from niftynet.utilities.util_common import ParserNamespace
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 5 for calling the ImageWindowTest obj's underlying member method code with example usage: obj.test_set_spatial_size() without return types