class_docstr: Test ImageDataset class.
docstr: Test iterating samples of an ImageDataset.
docstr_tok: ["Test","iterating","samples","of","an","ImageDataset","."]
code: def test_itersamples(self):
      """Test iterating samples of an ImageDataset."""
  
      path = os.path.join(os.path.dirname(__file__), "images")
      files = [os.path.join(path, f) for f in os.listdir(path)]
      ds = dc.data.ImageDataset(files, np.random.random(10))
      X = ds.X
      i = 0
      for x, y, w, id in ds.itersamples():
          np.testing.assert_array_equal(x, X[i])
          assert y == ds.y[i]
          assert w == ds.w[i]
          assert id == ds.ids[i]
          i += 1
      assert i == 10
  
file_path: deepchem/deepchem/data/tests/test_image_dataset.py
imports: import unittest
  import numpy
  import deepchem
  import os
label_desc: Use image node_id 2 for calling the TestImageDataset obj's underlying member method code with example usage: obj.test_itersamples() without return types