code: def check_async_run_results(
      results: list[ApplyResult],
      success: str,
      outputs: list[Output],
      include_success_outputs: bool,
      poll_time_seconds: float = 0.2,
      skip_cleanup: bool = False,
      summarize_on_ci: SummarizeAfter = SummarizeAfter.NO_SUMMARY,
      summary_start_regexp: str | None = None,
  ):
      """
      Check if all async results were success. Exits with error if not.
      :param results: results of parallel runs (expected in the form of Tuple: (return_code, info)
      :param outputs: outputs where results are written to
      :param success: Success string printed when everything is OK
      :param include_success_outputs: include outputs of successful parallel runs
      :param poll_time_seconds: what's the poll time between checks
      :param skip_cleanup: whether to skip cleanup of temporary files.
      :param summarize_on_ci: determines when to summarize the parallel jobs  when they are completed in CI,
          outside the folded CI output
      :param summary_start_regexp: the regexp that determines line after which
          outputs should be printed as summary, so that you do not have to look at the folded details of
          the run in CI
      """
      from airflow_breeze.utils.ci_group import ci_group
  
      completed_number = 0
      total_number_of_results = len(results)
      completed_list = get_completed_result_list(results)
      while not len(completed_list) == total_number_of_results:
          current_completed_number = len(completed_list)
          if current_completed_number != completed_number:
              completed_number = current_completed_number
              get_console().print(
                  f"\n[info]Completed {completed_number} out of {total_number_of_results} "
                  f"({completed_number / total_number_of_results:.0%}).[/]\n"
              )
              print_async_summary(completed_list)
          time.sleep(poll_time_seconds)
          completed_list = get_completed_result_list(results)
      completed_number = len(completed_list)
      get_console().print(
          f"\n[info]Completed {completed_number} out of {total_number_of_results} "
          f"({completed_number / total_number_of_results:.0%}).[/]\n"
      )
      print_async_summary(completed_list)
      errors = False
      for i, result in enumerate(results):
          if result.get()[0] != 0:
              errors = True
              message_type = MessageType.ERROR
          else:
              message_type = MessageType.SUCCESS
          if (
              message_type == MessageType.ERROR
              or include_success_outputs
          ):
              with ci_group(
                  title=f"{outputs[i].escaped_title}",
                  message_type=message_type,
              ):
                  os.write(1, Path(outputs[i].file_name).read_bytes())
          else:
              get_console().print(
                  f"[success]{outputs[i].escaped_title} OK[/]"
              )
      if summarize_on_ci != SummarizeAfter.NO_SUMMARY:
          regex = (
              re.compile(summary_start_regexp)
              if summary_start_regexp is not None
              else None
          )
          for i, result in enumerate(results):
              failure = result.get()[0] != 0
              if summarize_on_ci in [
                  SummarizeAfter.BOTH,
                  SummarizeAfter.FAILURE
                  if failure
                  else SummarizeAfter.SUCCESS,
              ]:
                  print_lines = False
                  for line in (
                      Path(outputs[i].file_name)
                      .read_bytes()
                      .decode(errors="ignore")
                      .splitlines()
                  ):
                      if not print_lines and (
                          regex is None
                          or regex.match(remove_ansi_colours(line))
                      ):
                          print_lines = True
                          get_console().print(
                              f"\n[info]Summary: {outputs[i].escaped_title:<30}:\n"
                          )
                      if print_lines:
                          print(line)
      try:
          if errors:
              get_console().print(
                  "\n[error]There were errors when running some tasks. Quitting.[/]\n"
              )
              from airflow_breeze.utils.docker_command_utils import (
                  fix_ownership_using_docker,
              )
  
              fix_ownership_using_docker()
              sys.exit(1)
          else:
              get_console().print(f"\n[success]{success}[/]\n")
              from airflow_breeze.utils.docker_command_utils import (
                  fix_ownership_using_docker,
              )
  
              fix_ownership_using_docker()
      finally:
          if not skip_cleanup:
              for output in outputs:
                  Path(output.file_name).unlink(missing_ok=True)
  
imports: from __future__ import annotations
  import datetime
  import os
  import re
  import sys
  import textwrap
  import time
  from abc import ABCMeta, abstractmethod
  from contextlib import contextmanager
  from enum import Enum
  from multiprocessing.pool import ApplyResult, Pool
  from pathlib import Path
  from tempfile import NamedTemporaryFile
  from threading import Thread
  from typing import Any, Generator, NamedTuple
  from rich.table import Table
  from airflow_breeze.utils.console import MessageType, Output, get_console
  from airflow_breeze.utils.shared_options import get_dry_run, get_forced_answer, get_verbose, set_dry_run, set_forced_answer, set_verbose
label_desc: Use image node_id 14 for calling a global function with example usage: check_async_run_results(results, success, outputs, include_success_outputs, poll_time_seconds, skip_cleanup, summarize_on_ci, summary_start_regexp) without return types