#NEWLINE# def new_task( self , uuid , items , metadata = None ) : #NEWLINE# #INDENT# if ( metadata == None ) : #NEWLINE# #INDENT# metadata = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# metadata [ 'uuid' ] = uuid #NEWLINE# metadata [ 'metadata' ] = True #NEWLINE# self . db [ uuid ] . create_index ( 'name' ) #NEWLINE# self . db [ uuid ] . create_index ( 'metadata' ) #NEWLINE# self . db [ uuid ] . insert ( items ) #NEWLINE# self . db [ uuid ] . insert ( metadata )