def print_task_output(batch_client, job_id, task_ids, encoding=None):
for task_id in task_ids:<EOL><INDENT>file_text = read_task_file_as_string(<EOL>batch_client,<EOL>job_id,<EOL>task_id,<EOL>_STANDARD_OUT_FILE_NAME,<EOL>encoding)<EOL>print("<STR_LIT>".format(<EOL>_STANDARD_OUT_FILE_NAME,<EOL>task_id))<EOL>print(file_text)<EOL>file_text = read_task_file_as_string(<EOL>batch_client,<EOL>job_id,<EOL>task_id,<EOL>_STANDARD_ERROR_FILE_NAME,<EOL>encoding)<EOL>print("<STR_LIT>".format(<EOL>_STANDARD_ERROR_FILE_NAME,<EOL>task_id))<EOL>print(file_text)<EOL><DEDENT>
Prints the stdout and stderr for each task specified.
    Originally in azure-batch-samples.Python.Batch.common.helpers

    :param batch_client: The batch client to use.
    :type batch_client: `batchserviceclient.BatchServiceClient`
    :param str job_id: The id of the job to monitor.
    :param task_ids: The collection of tasks to print the output for.
    :type task_ids: `list`
    :param str encoding: The encoding to use when downloading the file.