code: def _generate(
      cluster_name, cluster_dict, config, account_ids, regions
  ):
      """Add the CloudWatch destinations, mapping to the configured kinesis stream
  
      Args:
          cluster_name (str): The name of the current cluster being generated
          cluster_dict (defaultdict): The dict containing all Terraform config for
              a given cluster.
          config (dict): The loaded config from the 'conf/' directory
  
      Returns:
          bool: True if this module was applied successfully, False otherwise
      """
      # Ensure that the kinesis module is enabled for this cluster since the
      # cloudwatch module will utilize the created stream for sending data
      if not config["clusters"][cluster_name]["modules"].get("kinesis"):
          LOGGER.error(
              "The 'kinesis' module must be enabled to enable the "
              "'cloudwatch' module."
          )
          return False
  
      parent_module_name = "cloudwatch_logs_destination_{}".format(
          cluster_name
      )
  
      prefix = config["global"]["account"]["prefix"]
      stream_arn = "${{module.kinesis_{}.arn}}".format(cluster_name)
  
      # Merge these regions with any that are already in the configuration
      all_regions = sorted(
          set(
              cluster_dict["module"][parent_module_name].get(
                  "regions", []
              )
          ).union(set(regions))
      )
  
      cluster_dict["module"][parent_module_name] = {
          "source": "./modules/tf_cloudwatch_logs_destination",
          "prefix": prefix,
          "cluster": cluster_name,
          "regions": all_regions,
          "destination_kinesis_stream_arn": stream_arn,
      }
  
      for region in all_regions:
          module_name = "cloudwatch_logs_destination_{}_{}".format(
              cluster_name, region
          )
  
          # Merge these account IDs with any that are already in the configuration
          all_account_ids = set(
              cluster_dict["module"][module_name].get("account_ids", [])
          ).union(set(account_ids))
  
          cluster_dict["module"][module_name] = {
              "source": "./modules/tf_cloudwatch_logs_destination/modules/destination",
              "prefix": prefix,
              "cluster": cluster_name,
              "account_ids": sorted(all_account_ids),
              "destination_kinesis_stream_arn": stream_arn,
              "cloudwatch_logs_subscription_role_arn": (
                  "${{module.{}.cloudwatch_logs_subscription_role_arn}}".format(
                      parent_module_name
                  )
              ),
              "providers": {
                  # use the aliased provider for this region from providers.tf
                  "aws": "aws.{}".format(region)
              },
          }
  
      return True
  
imports: from streamalert.shared.logger import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: _generate(cluster_name, cluster_dict, config, account_ids, regions) and returns: True, False