code: def list_images(path=['.']):
      
      for image_dir in set(path):
          if not os.path.isdir(image_dir):
              continue
          for filename in os.listdir(image_dir):
              bname, ext = os.path.splitext(filename)
              if ext.lower() not in VALID_IMAGE_EXTS:
                  continue
  
              filepath = os.path.join(image_dir, filename)
              yield strutils.decode(filepath)
docs: Return list of image files