#NEWLINE# def layer_present( self , layer ) : #NEWLINE# #INDENT# ' Test that a layer exists in the data collection ' #NEWLINE# return ( ( layer in self . collect ) or ( getattr ( self , 'data' , None ) in self . collect ) )