code: def _generate_alerts_info_proto(
      anomaly_info: anomalies_pb2.AnomalyInfo, split_pair: str
  ) -> list[component_generated_alert_pb2.ComponentGeneratedAlertInfo]:
      """Generates a list of ComponentGeneratedAlertInfo from AnomalyInfo."""
      result = []
      for reason in anomaly_info.reason:
          result.append(
              component_generated_alert_pb2.ComponentGeneratedAlertInfo(
                  alert_name=(
                      f"[{split_pair}] {reason.short_description}"
                  ),
                  alert_body=f"[{split_pair}] {reason.description}",
              )
          )
      return result
  
imports: import os
  from typing import Any, Dict
  from absl import logging
  import tensorflow_data_validation
  from tensorflow_data_validation.utils import path
  from tensorflow_data_validation.utils import schema_util
  from tfx import types
  from tfx.components.statistics_gen import stats_artifact_utils
  from tfx.dsl.components.base import base_executor
  from tfx.orchestration.experimental.core import component_generated_alert_pb2
  from tfx.orchestration.experimental.core import constants
  from tfx.proto import distribution_validator_pb2
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import json_utils
  from tfx.utils import monitoring_utils
  from tfx.utils import writer_utils
  from google.protobuf import any_pb2
  from tensorflow_metadata.proto.v0 import anomalies_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: _generate_alerts_info_proto(anomaly_info, split_pair) and returns: result