def add_tasks(batch_service_client, job_id, loads,<EOL>output_container_name, output_container_sas_token,<EOL>task_file, acount_name):
_log.info('<STR_LIT>'.format(len(loads), job_id))<EOL>tasks = list()<EOL>for (input_file, output_file, i, j) in loads:<EOL><INDENT>command = ['<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>os.path.basename(task_file),<EOL>input_file.file_path,<EOL>output_file,<EOL>acount_name,<EOL>i, j,<EOL>output_container_name,<EOL>output_container_sas_token)]<EOL>_log.debug('<STR_LIT>'.format(command[<NUM_LIT:0>]))<EOL>tasks.append(batch.models.TaskAddParameter(<EOL>id='<STR_LIT>'.format(i, j),<EOL>command_line=command,<EOL>resource_files=[input_file]<EOL>)<EOL>)<EOL><DEDENT>batch_service_client.task.add_collection(job_id, tasks)<EOL>task_ids = [task.id for task in tasks]<EOL>_log.info('<STR_LIT>'.format(len(task_ids)))<EOL>return task_ids<EOL>
Adds a task for each input file in the collection to the specified job.

    :param batch_service_client: A Batch service client.
    :type batch_service_client: `azure.batch.BatchServiceClient`
    :param str job_id: The ID of the job to which to add the tasks.
    :param list input_files: A collection of input files. One task will be
     created for each input file.
    :param output_container_name: The ID of an Azure Blob storage container to
    which the tasks will upload their results.
    :param output_container_sas_token: A SAS token granting write access to
    the specified Azure Blob storage container.
    :param str task_file: A file name of the script
    :param str account_name: A storage account