<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def url2fs(url):
 """ encode a URL to be safe as a filename """

    uri, extension = posixpath.splitext(url)
    return safe64.dir(uri) + extension