code: def generate_apps(cluster_name, cluster_dict, config):
      """Add the app integrations 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 app integration module
      """
      prefix = config["global"]["account"]["prefix"]
  
      for function_name, app_info in (
          config["clusters"][cluster_name]["modules"]
          .get("streamalert_apps", {})
          .items()
      ):
          tf_module_prefix = "app_{}_{}".format(
              app_info["app_name"], cluster_name
          )
  
          destination_func = "{}_{}_streamalert_classifier".format(
              prefix, cluster_name
          )
  
          app_config = {
              "app_type": app_info["type"],
              "destination_function_name": destination_func,
              "schedule_expression": app_info["schedule_expression"],
          }
  
          # Format the iam module with 'app_<app_name_<cluster>_iam'
          cluster_dict["module"]["{}_iam".format(tf_module_prefix)] = {
              "account_id": config["global"]["account"][
                  "aws_account_id"
              ],
              "destination_function_name": destination_func,
              "function_name": function_name,
              "region": config["global"]["account"]["region"],
              "function_role_id": "${{module.{}_lambda.role_id}}".format(
                  tf_module_prefix
              ),
              "source": "./modules/tf_app_iam",
          }
  
          # Format the lambda module with 'app_<app_name_<cluster>_lambda'
          cluster_dict["module"][
              "{}_lambda".format(tf_module_prefix)
          ] = generate_lambda(
              function_name,
              "streamalert.apps.main.handler",
              config["clusters"][cluster_name]["modules"][
                  "streamalert_apps"
              ][function_name],
              config,
              input_event=app_config,
              include_layers=True,
          )
  
label_desc: Use image node_id 1 for calling a global function with example usage: generate_apps(cluster_name, cluster_dict, config) without return types