#NEWLINE# def load_or_create_all( self , objs , tosave = False ) : #NEWLINE# #INDENT# if ( not objs ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# if isinstance ( objs [ 0 ] , ObjectId ) : #NEWLINE# #INDENT# return self . load_all_by_ids ( objs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return [ self . load_or_create ( obj , self ) for obj in objs ]