#NEWLINE# def get_existing_thumbnail( self , thumbnail_options , high_resolution = False ) : #NEWLINE# #INDENT# '\n        Return a ``ThumbnailFile`` containing an existing thumbnail for a set\n        of thumbnail options, or ``None`` if not found.\n        ' #NEWLINE# thumbnail_options = self . get_options ( thumbnail_options ) #NEWLINE# names = [ self . get_thumbnail_name ( thumbnail_options , transparent = False , high_resolution = high_resolution ) ] #NEWLINE# transparent_name = self . get_thumbnail_name ( thumbnail_options , transparent = True , high_resolution = high_resolution ) #NEWLINE# if ( transparent_name not in names ) : #NEWLINE# #INDENT# names . append ( transparent_name ) #NEWLINE# #UNINDENT# for filename in names : #NEWLINE# #INDENT# exists = self . thumbnail_exists ( names ) #NEWLINE# if exists : #NEWLINE# #INDENT# thumbnail_file = ThumbnailFile ( name = filename , storage = self . thumbnail_storage , thumbnail_options = thumbnail_options ) #NEWLINE# if settings . THUMBNAIL_CACHE_DIMENSIONS : #NEWLINE# #INDENT# thumbnail_file . set_image_dimensions ( exists ) #NEWLINE# #UNINDENT# return thumbnail_file