#NEWLINE# def create_method_implementation( self , headers , content , code ) : #NEWLINE# #INDENT# 'Creates the implementation of the dynamic method' #NEWLINE# def implementation( self ) : #NEWLINE# #INDENT# for ( name , value ) in headers . items ( ) : #NEWLINE# #INDENT# self . set_header ( name , value ) #NEWLINE# #UNINDENT# if isinstance ( content , list ) : #NEWLINE# #INDENT# for line in content : #NEWLINE# #INDENT# self . write ( ( line + '\r\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . write ( content ) #NEWLINE# #UNINDENT# self . set_status ( code ) #NEWLINE# #UNINDENT# return code