code: def generate_global_lambda_settings(
      config, conf_name, generate_func, tf_tmp_file_name, required=True
  ):
      """Generate settings for global Lambda functions
  
      Args:
          config (dict): lambda function settings read from 'conf/' directory
          config_name (str): keyname of lambda function settings in config.
          generate_func (func): method to generate lambda function settings.
          tf_tmp_file (str): filename of terraform file, generated by CLI.
          message (str): Message will be logged by LOGGER.
      """
      tf_tmp_file = os.path.join(
          config.build_directory, "{}.tf.json".format(tf_tmp_file_name)
      )
  
      if required and conf_name not in config["lambda"]:
          message = "Required configuration missing in lambda.json: {}".format(
              conf_name
          )
          raise ConfigError(message)
  
      if not config["lambda"].get(conf_name):
          LOGGER.warning(
              "Optional configuration missing in lambda.json, skipping: %s",
              conf_name,
          )
          remove_temp_terraform_file(tf_tmp_file)
          return
  
      if config["lambda"][conf_name].get("enabled", True):
          generated_config = generate_func(config=config)
          if generated_config:
              _create_terraform_module_file(
                  generated_config, tf_tmp_file
              )
      else:
          remove_temp_terraform_file(tf_tmp_file)
  
imports: import json
  import os
  from streamalert.shared.config import ConfigError, firehose_alerts_bucket
  from streamalert.shared.logger import get_logger
  from streamalert.shared.utils import get_database_name, get_data_file_format
  from streamalert_cli.athena.helpers import generate_alerts_table_schema
  from streamalert_cli.helpers import check_credentials
  from streamalert_cli.terraform.common import InvalidClusterName, infinitedict, monitoring_topic_name, s3_access_logging_bucket, terraform_state_bucket
  from streamalert_cli.terraform.artifact_extractor import generate_artifact_extractor
  from streamalert_cli.terraform.alert_merger import generate_alert_merger
  from streamalert_cli.terraform.alert_processor import generate_alert_processor
  from streamalert_cli.terraform.apps import generate_apps
  from streamalert_cli.terraform.athena import generate_athena
  from streamalert_cli.terraform.cloudtrail import generate_cloudtrail
  from streamalert_cli.terraform.cloudwatch_destinations import generate_cloudwatch_destinations
  from streamalert_cli.terraform.cloudwatch_events import generate_cloudwatch_events
  from streamalert_cli.terraform.firehose import generate_firehose
  from streamalert_cli.terraform.flow_logs import generate_flow_logs
  from streamalert_cli.terraform.helpers import terraform_check
  from streamalert_cli.terraform.kinesis_events import generate_kinesis_events
  from streamalert_cli.terraform.kinesis_streams import generate_kinesis_streams
  from streamalert_cli.terraform.metrics import generate_aggregate_cloudwatch_metric_alarms, generate_aggregate_cloudwatch_metric_filters, generate_cluster_cloudwatch_metric_filters, generate_cluster_cloudwatch_metric_alarms
  from streamalert_cli.terraform.monitoring import generate_monitoring
  from streamalert_cli.terraform.rule_promotion import generate_rule_promotion
  from streamalert_cli.terraform.classifier import generate_classifier
  from streamalert_cli.terraform.rules_engine import generate_rules_engine
  from streamalert_cli.terraform.s3_events import generate_s3_events
  from streamalert_cli.terraform.scheduled_queries import generate_scheduled_queries_module_configuration
  from streamalert_cli.terraform.threat_intel_downloader import generate_threat_intel_downloader
  from streamalert_cli.utils import CLICommand
label_desc: Use image node_id 9 for calling a global function with example usage: generate_global_lambda_settings(config, conf_name, generate_func, tf_tmp_file_name, required) without return types