@gen.coroutine
def read_from_which_host(
        rsc, mode,
        tag_sets=None, secondary_acceptable_latency_ms=15):
    db = rsc.motor_test
    db.read_preference = mode
    if isinstance(tag_sets, dict):
        tag_sets = [tag_sets]
    db.tag_sets = tag_sets or [{}]
    db.secondary_acceptable_latency_ms = secondary_acceptable_latency_ms

    cursor = db.test.find()
    try:
        yield cursor.fetch_next
        host = cursor.delegate._Cursor__connection_id
    except AutoReconnect:
        host = None

    raise gen.Return(host)
Creates a response object with the given params and option
dataset/ETHPy150Open mongodb/motor/test/high_availability/test_motor_ha_utils.py/read_from_which_host--crossover with--dataset/ETHPy150Open toloco/pyoanda/pyoanda/client.py/Client.__get_response