code: def test_image_dataset_select():
      """Test that select works on image datasets."""
      path = os.path.join(os.path.dirname(__file__), "images")
      files = [os.path.join(path, f) for f in os.listdir(path)]
      dataset = dc.data.ImageDataset(files, np.random.random(10))
      indices = [0, 4, 5, 8, 2]
      select_dataset = dataset.select(indices)
      assert isinstance(select_dataset, dc.data.ImageDataset)
      X_sel, y_sel, w_sel, ids_sel = (
          select_dataset.X,
          select_dataset.y,
          select_dataset.w,
          select_dataset.ids,
      )
      np.testing.assert_array_equal(dataset.X[indices], X_sel)
      np.testing.assert_array_equal(dataset.y[indices], y_sel)
      np.testing.assert_array_equal(dataset.w[indices], w_sel)
      np.testing.assert_array_equal(dataset.ids[indices], ids_sel)
  
file_path: deepchem/deepchem/data/tests/test_select.py
imports: import deepchem
  import numpy
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: test_image_dataset_select() without return types