code: def _tf_metric_alarms(lambda_config, sns_arn):
      """Compute metric alarm Terraform configuration from the Lambda config."""
      result = {}
      alarms_config = lambda_config.get("metric_alarms", {})
      if not alarms_config:
          return result
  
      result["alarm_actions"] = [sns_arn]
  
      for alarm_type in ["errors", "throttles"]:
          settings = alarms_config.get(alarm_type)
          if not settings:
              continue
  
          for key in [
              "enabled",
              "evaluation_periods",
              "period_secs",
              "threshold",
          ]:
              if key in settings:
                  result[
                      "{}_alarm_{}".format(alarm_type, key)
                  ] = settings[key]
  
      return result
  
imports: from streamalert_cli.terraform.common import monitoring_topic_arn
label_desc: Use image node_id 1 for calling a global function with example usage: _tf_metric_alarms(lambda_config, sns_arn) and returns: result, result