human
Complete this python program:
def check_http_server(host, port):
assistant
#Here is the Python code you requested.

    """Check if an HTTP server is running.
    Attempts a request to an HTTP server and indicate the success
    or failure of the request.
    :param bytes host: Host to connect to.
    :param int port: Port to connect to.
    :return Deferred: Fires with True if the request received a response,
    False if the request failed.
    """
    req = get('http://{host}:{port}'.format(host=host, port=port), timeout=SOCKET_TIMEOUT_FOR_POLLING, persistent=False)
    def failed(failure):
        return False
    def succeeded(result):
        return True
    req.addCallbacks(succeeded, failed)
    return req