def _do_private_mode(FetcherClass, services, kwargs, random_wait_seconds, timeout, verbose):
addresses = kwargs.pop('<STR_LIT>')<EOL>results = {}<EOL>with futures.ThreadPoolExecutor(max_workers=len(addresses)) as executor:<EOL><INDENT>fetches = {}<EOL>for address in addresses:<EOL><INDENT>k = kwargs<EOL>k['<STR_LIT:address>'] = address<EOL>random.shuffle(services)<EOL>srv = FetcherClass(<EOL>services=services, verbose=verbose, timeout=timeout or <NUM_LIT>,<EOL>random_wait_seconds=random_wait_seconds<EOL>)<EOL>fetches[executor.submit(srv.action, **k)] = (srv, address)<EOL><DEDENT>to_iterate = futures.as_completed(fetches)<EOL>for future in to_iterate:<EOL><INDENT>service, address = fetches[future]<EOL>results[address] = future.result()<EOL><DEDENT><DEDENT>return results<EOL>
Private mode is only applicable to address_balance, unspent_outputs, and
historical_transactions. There will always be a list for the `addresses`
argument. Each address goes to a random service. Also a random delay is
performed before the external fetch for improved privacy.