def _DecodeUrlSafe(urlsafe):
if not isinstance(urlsafe, str):<EOL><INDENT>raise TypeError('<STR_LIT>' % urlsafe)<EOL><DEDENT>if isinstance(urlsafe, str):<EOL><INDENT>urlsafe = urlsafe.encode('<STR_LIT:utf8>')<EOL><DEDENT>mod = len(urlsafe) % <NUM_LIT:4><EOL>if mod:<EOL><INDENT>urlsafe += '<STR_LIT:=>' * (<NUM_LIT:4> - mod)<EOL><DEDENT>return base64.b64decode(urlsafe.replace('<STR_LIT:->', '<STR_LIT:+>').replace('<STR_LIT:_>', '<STR_LIT:/>'))<EOL>
Decode a url-safe base64-encoded string.

    This returns the decoded string.