code: def athena_partition_buckets_tf(config):
      """Get Terraform references for buckets from defaults and additionally configured ones
  
      When Terraform outputs/references are used, it ensures the bucket(s) are actually created
  
      Args:
          config (dict): The loaded config from the 'conf/' directory
  
      Returns:
          list: Bucket names for which Athena is enabled
      """
      # Add the Terraform module output for the alerts bucket
      buckets = {
          "${aws_s3_bucket.streamalerts.bucket}",
      }
      if firehose_data_bucket(
          config
      ):  # Data retention is optional, so check for this
          # Add the Terraform module output for the data bucket
          buckets.add(
              "${module.kinesis_firehose_setup.data_bucket_name}"
          )
  
      athena_config = config["lambda"]["athena_partitioner_config"]
  
      # Add any user-defined bucket names
      # These are controlled by the user and not by us, so we trust they exist
      buckets.update(set(athena_config.get("buckets", {})))
  
      return sorted(buckets)
  
imports: from collections import defaultdict, OrderedDict
  import json
  import os
  import re
  from streamalert.shared import CLUSTERED_FUNCTIONS
  from streamalert.shared.exceptions import ConfigError
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 4 for calling a global function with example usage: athena_partition_buckets_tf(config) and returns: sorted