':param count: The number of HTTP requests to sample the RTT from
:param host: If specified filter the requests by host before calculating
the average RTT
:return: Tuple with (average RTT from the last `count` requests,
the number of successful responses, which contain
an RTT, and were used to calculate the average RTT)'

def get_average_rtt(self, count=TIMEOUT_ADJUST_LIMIT, host=None):

    rtt_sum = 0.0
    add_count = 0
    last_n_responses = list(self._last_responses)[(- count):]
    for response_meta in last_n_responses:
        if (host is not None):
            if (response_meta.host != host):
                continue
        if (response_meta.rtt is not None):
            rtt_sum += response_meta.rtt
            add_count += 1
    if (not add_count):
        return (None, 0)
    else:
        average_rtt = (float(rtt_sum) / add_count)
        return (average_rtt, add_count)
