class_docstr: An end to end test using fully orchestrated Airflow.
class_docstr_tok: ["An","end","to","end","test","using","fully","orchestrated","Airflow","."]
code: def _PrintTaskLogsOnError(self, task):
      task_log_dir = os.path.join(
          self._airflow_home, "logs", self._dag_id, task
      )
      for dir_name, _, leaf_files in fileio.walk(task_log_dir):
          for leaf_file in leaf_files:
              leaf_file_path = os.path.join(dir_name, leaf_file)
              absl.logging.error("Print task log %s:", leaf_file_path)
              with fileio.open(leaf_file_path, "r") as f:
                  lines = f.readlines()
                  for line in lines:
                      absl.logging.error(line)
  
imports: import os
  import platform
  import subprocess
  import time
  from typing import Sequence, Set
  import unittest
  import absl
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.orchestration.airflow import test_utils
  from tfx.tools.cli.e2e import test_utils
  from tfx.utils import io_utils
  from tfx.utils import test_case_utils
label_desc: Use image node_id 3 for calling the AirflowEndToEndTest obj's underlying member method code with example usage: obj._PrintTaskLogsOnError(task) without return types