class_docstr: Test basic top-level API for dataset objects.
class_docstr_tok: ["Test","basic","top-level","API","for","dataset","objects","."]
docstr: Test creating a PyTorch Dataset from an ImageDataset.
docstr_tok: ["Test","creating","a","PyTorch","Dataset","from","an","ImageDataset","."]
code: def test_make_pytorch_dataset_from_images(self):
      """Test creating a PyTorch Dataset from an ImageDataset."""
      path = os.path.join(os.path.dirname(__file__), "images")
      files = [os.path.join(path, f) for f in os.listdir(path)]
      y = np.random.random((10, 1))
      ids = [str(i) for i in range(len(files))]
      dataset = dc.data.ImageDataset(files, y, ids=ids)
      _validate_pytorch_dataset(dataset)
  
imports: import random
  import math
  import unittest
  import os
  import numpy
  import pytest
  import deepchem
  import pandas
  import tempfile
label_desc: Use image node_id 3 for calling the TestDatasets obj's underlying member method code with example usage: obj.test_make_pytorch_dataset_from_images() without return types