code: def generate_cluster_cloudwatch_metric_alarms(
      cluster_name, cluster_dict, config
  ):
      """Add the CloudWatch Metric Alarms information to the Terraform cluster dict.
  
      Args:
          cluster_name (str): The name of the currently generating cluster
          cluster_dict (defaultdict): The dict containing all Terraform config for a given cluster.
          config (dict): The loaded config from the 'conf/' directory
      """
      infrastructure_config = config["global"].get("infrastructure")
  
      if not (
          infrastructure_config
          and "monitoring" in infrastructure_config
      ):
          LOGGER.error(
              "Invalid config: Make sure you declare global infrastructure options!"
          )
          return
  
      sns_topic_arn = monitoring_topic_arn(config)
  
      streamalert_config = config["clusters"][cluster_name]
  
      # Add cluster metric alarms for the clustered function(s). ie: classifier
      metric_alarms = [
          metric_alarm
          for func in CLUSTERED_FUNCTIONS
          for metric_alarm in streamalert_config[
              "{}_config".format(func)
          ].get("custom_metric_alarms", [])
      ]
  
      for idx, metric_alarm in enumerate(sorted(metric_alarms)):
          metric_alarm["source"] = "./modules/tf_metric_alarms"
          metric_alarm["sns_topic_arn"] = sns_topic_arn
          cluster_dict["module"][
              "metric_alarm_{}_{}".format(cluster_name, idx)
          ] = metric_alarm
  
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 4 for calling a global function with example usage: generate_cluster_cloudwatch_metric_alarms(cluster_name, cluster_dict, config) without return types