def assertReadFrom(testcase, client, member, *args, **kwargs):
 for _ in range(10):
  testcase.assertEqual(member, read_from_which_host(client, *args, **kwargs))

def assertReadFrom ( testcase , client , member , * args , ** kwargs ) : for _ in range ( 10 ) : testcase . assertEqual ( member , read_from_which_host ( client , * args , ** kwargs ) )
check that a query with the given mode and tag_sets reads from the expected replica-set member .