<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def rewrite_url(self, url_info: URLInfo) -> URLInfo:
        '''Return a rewritten URL such as escaped fragment.'''
        if self._url_rewriter:
            return self._url_rewriter.rewrite(url_info)
        else:
            return url_info