code: def test_initialise_with_subfolders():
      num_of_folders = 10
      num_of_images = 10
  
      (
          temp_directories,
          temp_files,
          parent_temp_directory,
      ) = create_sub_folders(
          number_of_sub_folders=num_of_folders,
          number_of_images=num_of_images,
      )
  
      assert len(temp_directories) == num_of_folders
      assert len(temp_files) == num_of_images * num_of_folders
  
      # Add some images in the root directory, and some folders in the sub directories,
      # they should not be found when doing the scan
      tmp_not_to_be_found = tempfile.NamedTemporaryFile(
          dir=parent_temp_directory, suffix=".JPEG", delete=False
      )
      im_not_to_be_found = Image.fromarray(
          np.uint8(np.random.rand(800, 800) * 255)
      )
      im_not_to_be_found.save(tmp_not_to_be_found.name, "JPEG")
  
      sub_temp_directory_not_to_be_found = tempfile.mkdtemp(
          dir=temp_directories[
              random.randint(0, len(temp_directories) - 1)
          ]
      )
  
      # TODO: fix
      files_found = ImageUtilities.scan_directory_with_classes(
          parent_temp_directory
      )
  
      assert len(files_found.keys()) == num_of_folders
  
      image_count = 0
      for val in files_found.values():
          image_count += len(val)
          for image_path in val:
              assert os.path.isfile(image_path)
  
      assert image_count == num_of_folders * num_of_images
  
      scanned_directories = []
      glob_scanned_files = glob.glob(
          os.path.join(parent_temp_directory, "*")
      )
  
      for glob_scanned_file in glob_scanned_files:
          if os.path.isdir(glob_scanned_file):
              scanned_directories.append(
                  os.path.split(glob_scanned_file)[1]
              )
  
      for key in files_found.keys():
          assert key in scanned_directories
          assert os.path.exists(
              os.path.join(parent_temp_directory, key)
          )
  
      # Tidy up and delete temporary files.
      tmp_not_to_be_found.close()
      shutil.rmtree(sub_temp_directory_not_to_be_found)
  
      for temp_file in temp_files:
          temp_file.close()
  
      for temp_directory in temp_directories:
          shutil.rmtree(temp_directory)
  
      shutil.rmtree(parent_temp_directory)
  
imports: import pytest
  import os
  import sys
  import Augmentor
  import tempfile
  import io
  import shutil
  import glob
  import random
  import numpy
  from PIL import Image
  from Augmentor import ImageUtilities
  from util_funcs import create_sub_folders
label_desc: Use image node_id 5 for calling a global function with example usage: test_initialise_with_subfolders() without return types