code: def test_create_lightly_dataset_from_folder(self):
      n_subfolders = 5
      n_samples_per_subfolder = 10
      n_tot_files = n_subfolders * n_samples_per_subfolder
  
      dataset_dir, folder_names, sample_names = self.create_dataset(
          n_subfolders, n_samples_per_subfolder
      )
  
      dataset = LightlyDataset(input_dir=dataset_dir)
      filenames = dataset.get_filenames()
  
      fnames = []
      for dir_name in folder_names:
          for fname in sample_names:
              fnames.append(os.path.join(dir_name, fname))
  
      self.assertEqual(len(filenames), n_tot_files)
      self.assertEqual(len(dataset), n_tot_files)
      self.assertListEqual(sorted(fnames), sorted(filenames))
  
      out_dir = tempfile.mkdtemp()
      dataset.dump(out_dir)
      self.assertEqual(
          sum(
              len(os.listdir(os.path.join(out_dir, subdir)))
              for subdir in os.listdir(out_dir)
          ),
          len(dataset),
      )
  
      shutil.rmtree(dataset_dir)
      shutil.rmtree(out_dir)
  
imports: import os
  import shutil
  import tempfile
  import unittest
  from typing import List, Tuple
  import numpy
  import torchvision
  from PIL.Image import Image
  from lightly.data import LightlyDataset
  from lightly.data._utils import check_images
label_desc: Use image node_id 5 for calling the TestLightlyDataset obj's underlying member method code with example usage: obj.test_create_lightly_dataset_from_folder() without return types