def lazy_client_trial(reset, target, test, get_client):
 collection = client_context.client.pymongo_test.test
 with frequent_thread_switches():
  for i in range(NTRIALS):
   reset(collection)
   lazy_client = get_client()
   lazy_collection = lazy_client.pymongo_test.test
   run_threads(lazy_collection, target)
   test(lazy_collection)

def lazy_client_trial ( reset , target , test , get_client ) : collection = client_context . client . pymongo_test . test with frequent_thread_switches ( ) : for i in range ( NTRIALS ) : reset ( collection ) lazy_client = get_client ( ) lazy_collection = lazy_client . pymongo_test . test run_threads ( lazy_collection , target ) test ( lazy_collection )
test concurrent operations on a lazily-connecting client .