code: def assertCoordinatesAreValid(self, coords, sampling_map):
      for coord in coords:
          for i in range(len(coord.shape)):
              self.assertTrue(coord[i] >= 0)
              self.assertTrue(coord[i] < sampling_map.shape[i])
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import numpy
  import tensorflow
  from niftynet.engine.image_window import N_SPATIAL
  from niftynet.engine.sampler_weighted_v2 import WeightedSampler, weighted_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 1 for calling the WeightedCoordinatesTest obj's underlying member method code with example usage: obj.assertCoordinatesAreValid(coords, sampling_map) without return types