from typing import Dict
from typing import Any


def _add_errors_to_input_data(data: Dict[str, Any],
                              num_errors: int) -> Dict[str, Any]:
  """Includes the error count to the input data.

  Args:
    data: The input data received in the trigger invocation.
    num_errors: The number of errors to add.

  Returns:
    The input data enriched with the num errors.
  """
  data['child']['num_errors'] = num_errors
  return data