def create_pool(batch_service_client, pool_id,<EOL>resource_files, publisher, offer, sku,<EOL>task_file, vm_size, node_count):
_log.info('<STR_LIT>'.format(pool_id))<EOL>task_commands = [<EOL>'<STR_LIT>'.format(os.path.basename(task_file)),<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>']<EOL>sku_to_use, image_ref_to_use =select_latest_verified_vm_image_with_node_agent_sku(<EOL>batch_service_client, publisher, offer, sku)<EOL>user = batchmodels.AutoUserSpecification(<EOL>scope=batchmodels.AutoUserScope.pool,<EOL>elevation_level=batchmodels.ElevationLevel.admin)<EOL>new_pool = batch.models.PoolAddParameter(<EOL>id=pool_id,<EOL>virtual_machine_configuration=batchmodels.VirtualMachineConfiguration(<EOL>image_reference=image_ref_to_use,<EOL>node_agent_sku_id=sku_to_use),<EOL>vm_size=vm_size,<EOL>target_dedicated_nodes=<NUM_LIT:0>,<EOL>target_low_priority_nodes=node_count,<EOL>start_task=batch.models.StartTask(<EOL>command_line=wrap_commands_in_shell('<STR_LIT>', task_commands),<EOL>user_identity=batchmodels.UserIdentity(auto_user=user),<EOL>wait_for_success=True,<EOL>resource_files=resource_files),<EOL>)<EOL>try:<EOL><INDENT>batch_service_client.pool.add(new_pool)<EOL><DEDENT>except batchmodels.BatchErrorException as err:<EOL><INDENT>print_batch_exception(err)<EOL>raise<EOL><DEDENT>
Creates a pool of compute nodes with the specified OS settings.

    :param batch_service_client: A Batch service client.
    :type batch_service_client: `azure.batch.BatchServiceClient`
    :param str pool_id: An ID for the new pool.
    :param list resource_files: A collection of resource files for the pool's
    start task.
    :param str publisher: Marketplace image publisher
    :param str offer: Marketplace image offer
    :param str sku: Marketplace image sku
    :param str task_file: A file name of the script
    :param str vm_size: A type of vm
    :param str node_count: The number of nodes