def METHOD_NAME(url):
    # Attempt to retrieve HTTP response code
    try:
        urlfile = urlopen(url)
        response_code = urlfile.getcode()
        urlfile.close()
    except IOError:
        response_code = None
    if not response_code:
        print("Did not receive a response from remote machine. Aborting...")
        sys.exit(1)
    else:
        # Check for a 4xx response code which indicates a nonexistent URL
        if response_code / 100 == 4:
            print("Image file not found on remote machine. Aborting...")
            sys.exit(1)