#NEWLINE# def hash_exists( self , hash ) : #NEWLINE# #INDENT# if ( hash in hash . hashes ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if self . use_db : #NEWLINE# #INDENT# return bool ( q ( m . Track ) . filter_by ( hash = hash ) . count ( ) ) #NEWLINE# #UNINDENT# return False