<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_tasks(batch_service_client, job_id, loads, output_container_name, output_container_sas_token, task_file, acount_name):
 """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 """


    _log.info('Adding {} tasks to job [{}]...'.format(len(loads), job_id))
    # _log.info('Adding {} tasks to job [{}]...'.format(len(input_files), job_id))

    tasks = list()

    for (input_file, output_file, i, j) in loads:
        command = ['python $AZ_BATCH_NODE_SHARED_DIR/{} '
                   '--filepath {} --output {} --storageaccount {} '
                   '--task_id {} --job_id {} '
                   '--storagecontainer {} --sastoken "{}"'.format(
                       os.path.basename(task_file),
                       input_file.file_path,
                       output_file,
                       acount_name,
                       i, j,
                       output_container_name,
                       output_container_sas_token)]
        _log.debug('CMD : "{}"'.format(command[0]))

        tasks.append(batch.models.TaskAddParameter(
                id='topNtask{}-{}'.format(i, j),
                command_line=command,
                resource_files=[input_file]
                )
        )

    batch_service_client.task.add_collection(job_id, tasks)

    task_ids = [task.id for task in tasks]
    _log.info('{} tasks were added.'.format(len(task_ids)))
    return task_ids