#NEWLINE# def compile_function( name , code , globs ) : #NEWLINE# #INDENT# '\n    Given a *code* string, compile it with globals *globs* and return\n    the function named *name*.\n    ' #NEWLINE# co = compile ( code . rstrip ( ) , '<string>' , 'single' ) #NEWLINE# ns = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# eval ( co , globs , ns ) #NEWLINE# return ns [ code ]