code: def generate_flow_logs(cluster_name, cluster_dict, config):
      """Add the VPC Flow Logs module 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
  
      Returns:
          bool: Result of applying the flow_logs module
      """
      modules = config["clusters"][cluster_name]["modules"]
      if not modules["flow_logs"].get("enabled", True):
          LOGGER.debug("Flow logs disabled, nothing to do")
          return True  # not an error
  
      prefix = config["global"]["account"]["prefix"]
      region = config["global"]["account"]["region"]
  
      # If 'vpcs', 'subnets', or 'enis' is defined within the config, we should create
      # flow logs for these values
      create_flow_logs = any(
          modules["flow_logs"].get(flow_log_type)
          for flow_log_type in DEFAULT_FLOW_LOG_TYPES
      )
  
      if not create_flow_logs:
          LOGGER.error(
              "Flow logs is enabled for cluster '%s', but none of the following are specified: %s",
              cluster_name,
              DEFAULT_FLOW_LOG_TYPES,
          )
          return False
  
      dest_fmt = "${{module.cloudwatch_logs_destination_{}_{}.cloudwatch_logs_destination_arn}}"
      flow_logs_settings = {
          "source": "./modules/tf_flow_logs",
          "prefix": prefix,
          "cluster": cluster_name,
          "cloudwatch_logs_destination_arn": dest_fmt.format(
              cluster_name, region
          ),
      }
  
      variables_with_defaults = ["log_retention", "flow_log_filter"]
      for variable in variables_with_defaults:
          if variable in modules["flow_logs"]:
              flow_logs_settings[variable] = modules["flow_logs"][
                  variable
              ]
  
      for flow_log_type in DEFAULT_FLOW_LOG_TYPES:
          values = modules["flow_logs"].get(flow_log_type)
          if values:
              flow_logs_settings[flow_log_type] = values
  
      cluster_dict["module"][
          "flow_logs_{}".format(cluster_name)
      ] = flow_logs_settings
  
      # Add the additional settings to allow for internal flow log sending
      return generate_cloudwatch_destinations_internal(
          cluster_name, cluster_dict, config
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: generate_flow_logs(cluster_name, cluster_dict, config) and returns: generate_cloudwatch_destinations_internal, True, False