#NEWLINE# def method_requires_auth( self , method ) : #NEWLINE# #INDENT# if isinstance ( self . _meta . authentication , AuthenticationByMethod ) : #NEWLINE# #INDENT# anon_methods = self . _meta . authentication . allowed_methods #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( self . _meta . authentication , Authentication ) : #NEWLINE# #INDENT# anon_methods = self . _meta . allowed_methods #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# anon_methods = [ ] #NEWLINE# #UNINDENT# #UNINDENT# if ( method in anon_methods ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return True