code: def generate_alert_merger(config):
      """Generate Terraform for the Alert Merger
      Args:
          config (dict): The loaded config from the 'conf/' directory
      Returns:
          dict: Alert Merger Terraform definition to be marshaled to JSON
      """
      prefix = config["global"]["account"]["prefix"]
  
      result = infinitedict()
  
      # Set variables for the alert merger's IAM permissions
      result["module"]["alert_merger_iam"] = {
          "source": "./modules/tf_alert_merger_iam",
          "account_id": config["global"]["account"]["aws_account_id"],
          "region": config["global"]["account"]["region"],
          "prefix": config["global"]["account"]["prefix"],
          "role_id": "${module.alert_merger_lambda.role_id}",
      }
  
      # Set variables for the Lambda module
      result["module"]["alert_merger_lambda"] = generate_lambda(
          "{}_streamalert_{}".format(
              config["global"]["account"]["prefix"], ALERT_MERGER_NAME
          ),
          "streamalert.alert_merger.main.handler",
          config["lambda"]["alert_merger_config"],
          config,
          environment={
              "ALERTS_TABLE": "{}_streamalert_alerts".format(prefix),
              "ALERT_PROCESSOR": "{}_streamalert_alert_processor".format(
                  prefix
              ),
              "ALERT_PROCESSOR_TIMEOUT_SEC": config["lambda"][
                  "alert_processor_config"
              ]["timeout"],
          },
      )
  
      return result
  
imports: from streamalert.shared import ALERT_MERGER_NAME
  from streamalert_cli.terraform.common import infinitedict
  from streamalert_cli.terraform.lambda_module import generate_lambda
label_desc: Use image node_id 1 for calling a global function with example usage: generate_alert_merger(config) and returns: result