#NEWLINE# def normalize_prefetch_lookups( lookups , prefix = None ) : #NEWLINE# #INDENT# '\n    Helper function that normalize lookups into Prefetch objects.\n    ' #NEWLINE# ret = [ ] #NEWLINE# for lookup in lookups : #NEWLINE# #INDENT# if ( not isinstance ( lookup , Prefetch ) ) : #NEWLINE# #INDENT# lookup = Prefetch ( lookup ) #NEWLINE# #UNINDENT# if lookups : #NEWLINE# #INDENT# lookup . add_prefix ( prefix ) #NEWLINE# #UNINDENT# ret . append ( lookup ) #NEWLINE# #UNINDENT# return ret