<s> import unicodedata <EOL> import urllib <EOL> def normalize ( name ) : <EOL> if not isinstance ( name , unicode ) : <EOL> name = name . decode ( '<STR_LIT:utf-8>' ) <EOL> name = name . replace ( "<STR_LIT:'>" , '<STR_LIT>' ) <EOL> return unicodedata . normalize ( '<STR_LIT>' , name ) . encode ( '<STR_LIT:utf-8>' ) <EOL> def quote ( name ) : <EOL> if isinstance ( name , unicode ) : <EOL> name = normalize ( name ) <EOL> return urllib . quote ( name ) <EOL> def make_icon_url ( region , icon , size = '<STR_LIT>' ) : <EOL> if not icon : <EOL> return '<STR_LIT>' <EOL> if size == '<STR_LIT>' : <EOL> size = <NUM_LIT> <EOL> else : <EOL> size = <NUM_LIT> <EOL> return '<STR_LIT>' % ( region , size , icon ) <EOL> def make_connection ( ) : <EOL> if not hasattr ( make_connection , '<STR_LIT>' ) : <EOL> from . connection import Connection <EOL> make_connection . Connection = Connection <EOL> return make_connection . Connection ( ) </s>
