code: def test_select_not_sorted():
      """Test that dataset select with ids not in sorted order."""
      num_datapoints = 10
      num_features = 10
      num_tasks = 1
      X = np.random.rand(num_datapoints, num_features)
      y = np.random.randint(2, size=(num_datapoints, num_tasks))
      w = np.ones((num_datapoints, num_tasks))
      ids = np.array(["id"] * num_datapoints)
      dataset = dc.data.DiskDataset.from_numpy(X, y, w, ids)
  
      indices = [4, 2, 8, 5, 0]
      select_dataset = dataset.select(indices)
      assert isinstance(select_dataset, dc.data.DiskDataset)
      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(X[indices], X_sel)
      np.testing.assert_array_equal(y[indices], y_sel)
      np.testing.assert_array_equal(w[indices], w_sel)
      np.testing.assert_array_equal(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 5 for calling a global function with example usage: test_select_not_sorted() without return types