<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def http_purge_url(url):
 """ Do an HTTP PURGE of the given asset. The URL is run through urlparse and must point to the varnish instance not the varnishadm """

    url = urlparse(url)
    connection = HTTPConnection(url.hostname, url.port or 80)
    path = url.path or '/'
    connection.request('PURGE', '%s?%s' % (path, url.query) if url.query else path, '',
                       {'Host': '%s:%s' % (url.hostname, url.port) if url.port else url.hostname})
    response = connection.getresponse()
    if response.status != 200:
        logging.error('Purge failed with status: %s' % response.status)
    return response