code: def remove_non_image_files(folder):
      # Define allowed image file extensions
      allowed_extensions = {
          ".jpg",
          ".jpeg",
          ".png",
          ".JPG",
          ".JPEG",
          ".PNG",
      }
  
      # Iterate through all files in the folder
      for root, dirs, files in os.walk(folder):
          for file in files:
              # Get the file extension
              file_extension = os.path.splitext(file)[1]
  
              # If the file extension is not in the allowed list, remove the file
              if file_extension.lower() not in allowed_extensions:
                  file_path = os.path.join(root, file)
                  os.remove(file_path)
                  print(f"Removed file: {file_path}")
  
          # Recursively call the function on each subfolder
          for subfolder in dirs:
              remove_non_image_files(os.path.join(root, subfolder))
  
imports: import io
  import os
  import uuid
  import zipfile
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional
  import pandas
  from autotrain import logger
  from autotrain.preprocessor.dreambooth import DreamboothPreprocessor
  from autotrain.preprocessor.tabular import TabularBinaryClassificationPreprocessor, TabularMultiClassClassificationPreprocessor, TabularMultiColumnRegressionPreprocessor, TabularMultiLabelClassificationPreprocessor, TabularSingleColumnRegressionPreprocessor
  from autotrain.preprocessor.text import LLMPreprocessor, Seq2SeqPreprocessor, TextBinaryClassificationPreprocessor, TextMultiClassClassificationPreprocessor, TextSingleColumnRegressionPreprocessor
  from autotrain.preprocessor.vision import ImageClassificationPreprocessor
label_desc: Use image node_id 1 for calling a global function with example usage: remove_non_image_files(folder) without return types