code: def list_pictures(
      directory, ext=("jpg", "jpeg", "bmp", "png", "ppm", "tif", "tiff")
  ):
      """Lists all pictures in a directory, including all subdirectories.
  
      # Arguments
          directory: string, absolute path to the directory
          ext: tuple of strings or single string, extensions of the pictures
  
      # Returns
          a list of paths
      """
      ext = tuple(
          ".%s" % e for e in ((ext,) if isinstance(ext, str) else ext)
      )
      return [
          os.path.join(root, f)
          for root, _, files in os.walk(directory)
          for f in files
          if f.lower().endswith(ext)
      ]
  
file_path: keras-preprocessing/keras_preprocessing/image/utils.py
imports: import io
  import os
  import warnings
  from pathlib import Path
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: list_pictures(directory, ext) and returns: unknown