def replace_urls(status):
text = status.text<EOL>if not has_url(status):<EOL><INDENT>return text<EOL><DEDENT>urls = [(e['<STR_LIT>'], e['<STR_LIT>']) for e in status.entities['<STR_LIT>']]<EOL>urls.sort(key=lambda x: x[<NUM_LIT:0>][<NUM_LIT:0>], reverse=True)<EOL>for (start, end), url in urls:<EOL><INDENT>text = text[:start] + url + text[end:]<EOL><DEDENT>return text<EOL>
Replace shorturls in a status with expanded urls.

Args:
    status (tweepy.status): A tweepy status object

Returns:
    str