<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_url(url):
 """ Remove params, query and fragment parts from URL so that `os.path.basename` and `os.path.splitext` can work correctly. @param url: URL to clean. @type url: str @return: Cleaned URL. @rtype: str """

    parsed = urlparse(url.strip())
    reconstructed = ParseResult(
        parsed.scheme, parsed.netloc, parsed.path,
        params='', query='', fragment='')
    return reconstructed.geturl()