code: def generate_samples(num_samples, ndim, dtype):
      samples = []
      for i in range(num_samples):
          shape = list(np.random.randint(5, 13, [ndim]))
          num_classes = np.random.randint(1, 10)
          blobs_per_class = np.random.randint(1, 10)
          samples.append(
              generate_data(shape, num_classes, blobs_per_class).astype(
                  dtype
              )
          )
      return samples
  
imports: from nose_utils import assert_raises
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.ops
  import numpy
  import scipy.ndimage
  import scipy.ndimage.measurements
  import random
  from test_utils import check_batch, np_type_to_dali
  from nose.tools import nottest
  from nose.plugins.attrib import attr
label_desc: Use image node_id 14 for calling a global function with example usage: generate_samples(num_samples, ndim, dtype) and returns: samples