code: def scan_directory_with_classes(source_directory):
      warnings.warn(
          "The scan_directory_with_classes() function has been deprecated.",
          DeprecationWarning,
      )
      l = glob.glob(os.path.join(source_directory, "*"))
  
      directories = []
  
      for f in l:
          if os.path.isdir(f):
              directories.append(f)
  
      list_of_files = {}
  
      for d in directories:
          list_of_files_current_folder = scan_directory(d)
          list_of_files[
              os.path.split(d)[1]
          ] = list_of_files_current_folder
  
      return list_of_files
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from builtins import *
  import os
  import glob
  import numbers
  import random
  import warnings
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: scan_directory_with_classes(source_directory) and returns: list_of_files