'Calculates the distance between two responses based on the HTTP response code
:return: The distance'

def _http_code_distance(self, a, b):

    distance = 0.1
    for i in [100, 200, 300, 400, 500]:
        if ((a.get_code() in xrange(i, (i + 100))) and (not (b.get_code() in xrange(i, (i + 100))))):
            distance = 1
            return distance
    return distance
