#NEWLINE# def read_index( db ) : #NEWLINE# #INDENT# ' Read the index and return the data.\n\n    Returns an empty dictionary if no index exists.\n\n    ' #NEWLINE# if exists ( f ) : #NEWLINE# #INDENT# with open ( db ) as f : #NEWLINE# #INDENT# data = json . load ( f ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return data