def METHOD_NAME(datadog_api_key, datadog_app_key, expected_data):
    try:
        rule = {
            'name': 'Test Datadog Event Alerter',
            'type': 'any',
            'alert': [],
            'alert_subject': 'Test Datadog Event Alert'
        }
        if datadog_api_key:
            rule['datadog_api_key'] = datadog_api_key
        if datadog_app_key:
            rule['datadog_app_key'] = datadog_app_key
        rules_loader = FileRulesLoader({})
        rules_loader.load_modules(rule)
        alert = DatadogAlerter(rule)
        actual_data = alert.get_info()
        assert expected_data == actual_data
    except Exception as ea:
        assert expected_data in str(ea)