#NEWLINE# def _check_name_exists( self , collection , node ) : #NEWLINE# #INDENT# existing = collection . get ( node . funcname ) #NEWLINE# collection [ node . funcname ] = node #NEWLINE# if ( ( existing is not None ) and ( existing is not node ) and ( node . is_block or existing . is_block ) ) : #NEWLINE# #INDENT# raise exceptions . CompileException ( ( "%%def or %%block named '%s' already exists in this template." % existing . funcname ) , ** node . exception_kwargs )