class_docstr: Sends alerts to the Alert Processor and the alerts DynamoDB table.
docstr: Send alerts to the Dynamo table.
  
  Args:
      alerts (list): A list of Alert instances to save to Dynamo.
docstr_tok: ["Send","alerts","to","the","Dynamo","table",".","Args",":","alerts","(","list",")",":","A","list","of","Alert","instances","to","save","to","Dynamo","."]
code: def send_alerts(self, alerts):
      """Send alerts to the Dynamo table.
  
      Args:
          alerts (list): A list of Alert instances to save to Dynamo.
      """
      if not alerts:
          return  # nothing to do
  
      try:
          self._table.add_alerts(alerts)
      except ClientError:
          # add_alerts() automatically retries transient errors - any raised ClientError
          # is likely unrecoverable. Log an exception and metric
          LOGGER.exception(
              "An error occurred when sending alerts to DynamoDB"
          )
          MetricLogger.log_metric(
              FUNCTION_NAME, MetricLogger.FAILED_DYNAMO_WRITES, 1
          )
          return
  
      LOGGER.info(
          "Successfully sent %d alert(s) to dynamo:%s",
          len(alerts),
          self._table.name,
      )
  
file_path: streamalert/streamalert/rules_engine/alert_forwarder.py
imports: import os
  from botocore.exceptions import ClientError
  from streamalert.shared import RULES_ENGINE_FUNCTION_NAME
  from streamalert.shared.alert_table import AlertTable
  from streamalert.shared.logger import get_logger
  from streamalert.shared.metrics import MetricLogger
label_desc: Use image node_id 2 for calling the AlertForwarder obj's underlying member method code with example usage: obj.send_alerts(alerts) without return types