#NEWLINE# def derived( self , locals = None ) : #NEWLINE# #INDENT# 'Internal helper function to create a derived context.' #NEWLINE# context = new_context ( self . environment , self . name , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , self . parent , True , None , locals ) #NEWLINE# context . vars . update ( self . vars ) #NEWLINE# context . eval_ctx = self . eval_ctx #NEWLINE# context . blocks . update ( ( ( k , list ( v ) ) for ( k , v ) in self . blocks . iteritems ( ) ) ) #NEWLINE# return context