code: def test_filenames_dataset_no_subdir(self):
      # create a dataset
      n_tot = 100
      dataset = torchvision.datasets.FakeData(
          size=n_tot, image_size=(3, 32, 32)
      )
  
      tmp_dir = tempfile.mkdtemp()
      all_filenames = [f"img_{i}.jpg" for i in range(n_tot)]
      for sample_idx in range(n_tot):
          data = dataset[sample_idx]
          path = os.path.join(tmp_dir, all_filenames[sample_idx])
          data[0].save(path)
  
      n_samples = len(all_filenames) // 2
      for i in range(5):
          np.random.seed(i)
          filenames = np.random.choice(
              all_filenames, n_samples, replace=False
          )
  
          dataset = LightlyDataset(
              input_dir=tmp_dir, filenames=filenames
          )
          filenames_dataset = dataset.get_filenames()
          self.assertEqual(len(filenames_dataset), len(dataset))
          self.assertEqual(len(filenames_dataset), len(filenames))
          self.assertEqual(set(filenames_dataset), set(filenames))
          filenames_dataset = set(filenames_dataset)
          for image, target, filename in dataset:
              self.assertIsInstance(image, Image)
              self.assertEqual(target, 0)
              self.assertIsInstance(filename, str)
              self.assertIn(filename, filenames_dataset)
  
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 13 for calling the TestLightlyDataset obj's underlying member method code with example usage: obj.test_filenames_dataset_no_subdir() without return types