code: def __test_images(self, trn, val, preproc, nsamples=16):
      self.assertTrue(U.is_iter(trn))
      self.assertEqual(U.shape_from_data(trn), (224, 224, 3))
      self.assertTrue(U.ondisk(trn))
      self.assertEqual(U.nsamples_from_data(trn), nsamples)
      self.assertEqual(U.nclasses_from_data(trn), 2)
      self.assertEqual(U.y_from_data(trn).shape, (nsamples, 2))
      self.assertFalse(U.bert_data_tuple(trn))
      self.assertEqual(preproc.get_classes(), ["cat", "dog"])
      (gen, steps) = preproc.preprocess(
          os.path.join(CURRDIR, "resources/image_data/image_folder/all")
      )
      self.assertEqual(type(gen).__name__, "DirectoryIterator")
      self.assertEqual(steps, 1)
  
imports: import os.path
  from unittest import TestCase, main, skip
  import testenv
  import ktrain
  from ktrain import text
  from ktrain import utils
  from ktrain import vision
label_desc: Use image node_id 4 for calling the TestImageData obj's underlying member method code with example usage: obj.__test_images(trn, val, preproc, nsamples) without return types