code: def test_nopadding_coordinates(self):
      coords = grid_spatial_coordinates(
          subject_id=1,
          img_sizes={
              "image": (64, 64, 64, 1, 2),
              "label": (64, 64, 42, 1, 1),
          },
          win_sizes={"image": (63, 63, 40), "label": (50, 62, 40)},
          border_size=(-1, -1, -1),
      )
  
      coords_1 = grid_spatial_coordinates(
          subject_id=1,
          img_sizes={
              "image": (64, 64, 64, 1, 2),
              "label": (64, 64, 42, 1, 1),
          },
          win_sizes={"image": (63, 63, 40), "label": (50, 62, 40)},
          border_size=(0, 0, 0),
      )
      self.assertAllClose(coords["image"], coords_1["image"])
      self.assertAllClose(coords["label"], coords_1["label"])
      expected_image = np.array(
          [
              [1, 0, 0, 0, 63, 63, 40],
              [1, 0, 0, 24, 63, 63, 64],
              [1, 0, 0, 12, 63, 63, 52],
              [1, 1, 0, 0, 64, 63, 40],
              [1, 1, 0, 24, 64, 63, 64],
              [1, 1, 0, 12, 64, 63, 52],
              [1, 0, 1, 0, 63, 64, 40],
              [1, 0, 1, 24, 63, 64, 64],
              [1, 0, 1, 12, 63, 64, 52],
              [1, 1, 1, 0, 64, 64, 40],
              [1, 1, 1, 24, 64, 64, 64],
              [1, 1, 1, 12, 64, 64, 52],
          ],
          dtype=np.int32,
      )
      self.assertAllClose(coords["image"], expected_image)
      expected_label = np.array(
          [
              [1, 0, 0, 0, 50, 62, 40],
              [1, 0, 0, 2, 50, 62, 42],
              [1, 0, 0, 1, 50, 62, 41],
              [1, 14, 0, 0, 64, 62, 40],
              [1, 14, 0, 2, 64, 62, 42],
              [1, 14, 0, 1, 64, 62, 41],
              [1, 7, 0, 0, 57, 62, 40],
              [1, 7, 0, 2, 57, 62, 42],
              [1, 7, 0, 1, 57, 62, 41],
              [1, 0, 2, 0, 50, 64, 40],
              [1, 0, 2, 2, 50, 64, 42],
              [1, 0, 2, 1, 50, 64, 41],
              [1, 14, 2, 0, 64, 64, 40],
              [1, 14, 2, 2, 64, 64, 42],
              [1, 14, 2, 1, 64, 64, 41],
              [1, 7, 2, 0, 57, 64, 40],
              [1, 7, 2, 2, 57, 64, 42],
              [1, 7, 2, 1, 57, 64, 41],
              [1, 0, 1, 0, 50, 63, 40],
              [1, 0, 1, 2, 50, 63, 42],
              [1, 0, 1, 1, 50, 63, 41],
              [1, 14, 1, 0, 64, 63, 40],
              [1, 14, 1, 2, 64, 63, 42],
              [1, 14, 1, 1, 64, 63, 41],
              [1, 7, 1, 0, 57, 63, 40],
              [1, 7, 1, 2, 57, 63, 42],
              [1, 7, 1, 1, 57, 63, 41],
          ],
          dtype=np.int32,
      )
      self.assertAllClose(coords["label"], expected_label)
      with self.assertRaisesRegexp(AssertionError, ""):
          coords_1 = grid_spatial_coordinates(
              subject_id=1,
              img_sizes={
                  "image": (64, 64, 64, 1, 2),
                  "label": (42, 42, 42, 1, 1),
              },
              win_sizes={"image": (63, 63, 40), "label": (80, 80, 33)},
              border_size=(0, 0, 0),
          )
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import numpy
  import tensorflow
  from niftynet.engine.sampler_grid_v2 import GridSampler, _enumerate_step_points, grid_spatial_coordinates
  from niftynet.io.image_reader import ImageReader
  from niftynet.io.image_sets_partitioner import ImageSetsPartitioner
  from niftynet.utilities.util_common import ParserNamespace
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 3 for calling the CoordinatesTest obj's underlying member method code with example usage: obj.test_nopadding_coordinates() without return types