def generate_fake_ping_data(random_state, size):
    """
    Generate random ping values (in milliseconds) between 5 and 20,
    some of them will be assigned randomly to a low latency between 100 and 200
    with direct close values between 40 and 80
    """
    values = random_state.random_integers(low=5, high=20, size=size)
    picked_low_latency_values_indexes = random_state.choice(
        size, round(0.001 * len(values)), replace=False
    )

    # Sets the picked value to a random low ping (e.g.: [100, 200]),
    # and sets the direct close values to a ping between 40 and 80ms
    for index in picked_low_latency_values_indexes:
        if index - 1 >= 0:
            values[index - 1] = random_state.random_integers(40, 80)

        values[index] = random_state.random_integers(100, 200)

        if index + 1 < size:
            values[index + 1] = random_state.random_integers(40, 80)

    return values.tolist()