<s> import re <EOL> re_host = re . compile ( "<STR_LIT>" ) <EOL> class CouchDBRouter ( object ) : <EOL> def lookup ( self , name ) : <EOL> """<STR_LIT>""" <EOL> return ( "<STR_LIT:127.0.0.1>" , <NUM_LIT> ) <EOL> router = CouchDBRouter ( ) <EOL> def proxy ( data ) : <EOL> matches = re_host . findall ( data ) <EOL> if matches : <EOL> host = router . lookup ( matches . pop ( ) ) <EOL> return { "<STR_LIT>" : host } <EOL> return None </s>
