code: def __init__(
      self,
      path,
      transforms,
      extensions=[".jpg", ".png"],
      recursive=False,
      verbose=False,
  ):
      self.verbose = verbose
      if self.verbose:
          logger = logging.getLogger(__name__)
  
      if len(extensions) == 0:
          if self.verbose:
              logger.error(
                  "Expected at list one extension, but none was received."
              )
          raise ValueError
  
      if self.verbose:
          logger.info("Constructing the list of images.")
      additional_pattern = "/**/*" if recursive else "/*"
      files = []
      for extension in extensions:
          files.extend(
              glob.glob(
                  path + additional_pattern + extension,
                  recursive=recursive,
              )
          )
  
      if self.verbose:
          logger.info(
              "Finished searching for images. %s images found",
              len(files),
          )
          logger.info("Preparing to run the detection.")
  
      self.files = files
      self.transforms = transforms
  
imports: import logging
  import glob
  import torch
label_desc: Use image node_id 1 to create a new FolderData object from inherited base classes: torch.utils.data with example: obj = FolderData(path, transforms, extensions, recursive, verbose)