<s> import re <EOL> from django . core . urlresolvers import reverse <EOL> from mama_cas . compat import etree <EOL> from mama_cas . compat import urlencode <EOL> def parse ( s ) : <EOL> """<STR_LIT>""" <EOL> ns = re . compile ( r'<STR_LIT>' ) <EOL> et = etree . fromstring ( s ) <EOL> for elem in et . getiterator ( ) : <EOL> elem . tag = ns . sub ( '<STR_LIT>' , elem . tag ) <EOL> return et <EOL> def build_url ( name , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return reverse ( name ) + '<STR_LIT:?>' + urlencode ( kwargs ) </s>
