#NEWLINE# def create_method_not_allowed( allowed_methods ) : #NEWLINE# #INDENT# 'Creates a responder for "405 Method Not Allowed"\n\n    Args:\n        allowed_methods: A list of HTTP methods (uppercase) that should be\n            returned in the Allow header.\n\n    ' #NEWLINE# allowed = ', ' . join ( method_not_allowed ) #NEWLINE# def method_not_allowed( req , resp , **kwargs ) : #NEWLINE# #INDENT# resp . status = HTTP_405 #NEWLINE# resp . set_header ( 'Allow' , allowed ) #NEWLINE# #UNINDENT# return method_not_allowed