<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_url_exists(url):
 """Returns whether the given HTTP URL 'exists' in the sense that it is returning an HTTP error code or not. A URL is considered to exist if it does not return an HTTP error code."""

    class HEADRequest(Request):
        def get_method(self):
            return "HEAD"
    try:
        response = urlopen(HEADRequest(url))
        return True
    except URLError:
        return False