"""Utility functions for fan-triggered-sends Lambda.""" import config def is_triggered_send_enabled_for_business_unit_id(business_unit_id: str) -> bool: """Check if triggered send is enabled for the given business unit. Args: business_unit_id (str): The ID of the business unit to check. Returns: bool: True if triggered send FF is enabled for the business_unit_id, False otherwise. """ treatment = config.splitio_client.get_treatment( 'system', config.TRIGGERED_SENDS_BUSINESS_UNIT_ALLOWLIST, {'business_unit_id': business_unit_id}) return treatment == 'on'