code: def test_3d_coordinates(self):
      img_size = [8, 9, 10]
      win_size = [7, 9, 4]
      coords = rand_spatial_coordinates(32, img_size, win_size, None)
      self.assertAllEqual(coords.shape, (32, N_SPATIAL))
      self.assertCoordinatesAreValid(coords, img_size, win_size)
  
imports: from __future__ import absolute_import, division, print_function
  import os
  import numpy
  import tensorflow
  from niftynet.contrib.csv_reader.csv_reader import CSVReader
  from niftynet.contrib.csv_reader.sampler_csvpatch import CSVPatchSampler
  from niftynet.engine.image_window import N_SPATIAL
  from niftynet.engine.sampler_uniform_v2 import rand_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 2 for calling the RandomCoordinatesTest obj's underlying member method code with example usage: obj.test_3d_coordinates() without return types