code: def test_random_vector(self):
      sampler = RandomVectorSampler(
          names=("test_vector",),
          vector_size=(100,),
          batch_size=20,
          repeat=None,
      )
      with self.cached_session() as sess:
          sampler.set_num_threads(2)
          out = sess.run(sampler.pop_batch_op())
          self.assertAllClose(out["test_vector"].shape, (20, 100))
      sampler.close_all()
  
file_path: NiftyNet/tests/sampler_random_vector_v2_test.py
imports: from __future__ import absolute_import, division, print_function
  import numpy
  import tensorflow
  from niftynet.engine.sampler_random_vector_v2 import RandomVectorSampler
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the RandomVectorSamplerTest obj's underlying member method code with example usage: obj.test_random_vector() without return types