code: def generate_aggregate_cloudwatch_metric_alarms(config):
      """Return any CloudWatch Metric Alarms for aggregate metrics
  
      Args:
          config (dict): The loaded config from the 'conf/' directory
      """
      result = infinitedict()
  
      sns_topic_arn = monitoring_topic_arn(config)
  
      for func, func_config in config["lambda"].items():
          metric_alarms = func_config.get("custom_metric_alarms")
          if not metric_alarms:
              continue
  
          func = func.replace("_config", "")
  
          for idx, name in enumerate(sorted(metric_alarms)):
              alarm_settings = metric_alarms[name]
              alarm_settings["source"] = "./modules/tf_metric_alarms"
              alarm_settings["sns_topic_arn"] = sns_topic_arn
              alarm_settings["alarm_name"] = name
              result["module"][
                  "metric_alarm_{}_{}".format(func, idx)
              ] = alarm_settings
  
      return result
  
file_path: streamalert/streamalert_cli/terraform/metrics.py
imports: from streamalert.shared import metrics
  from streamalert.shared import CLUSTERED_FUNCTIONS
  from streamalert.shared.logger import get_logger
  from streamalert_cli.terraform.common import infinitedict, monitoring_topic_arn
label_desc: Use image node_id 2 for calling a global function with example usage: generate_aggregate_cloudwatch_metric_alarms(config) and returns: result