def METHOD_NAME(user_ids, app_name, notification_type, course_key, content_url, content):
    """
    Emit an event when a notification is generated.
    """
    context = contexts.course_context_from_course_id(course_key)
    context['user_id'] = 'None'
    recipients_count = len(user_ids)
    event_data = {
        'recipients_id': user_ids[:100],
        'recipients_count': recipients_count,
        'recipients_truncated': recipients_count > 100,
        'course_id': str(course_key),
        'notification_type': notification_type,
        'notification_app': app_name,
        'content_url': content_url,
        'notification_content': content,
    }
    with tracker.get_tracker().context(NOTIFICATION_GENERATED, context):
        tracker.emit(
            NOTIFICATION_GENERATED,
            event_data,
        )
        segment.track(
            'None',
            NOTIFICATION_GENERATED,
            event_data,
        )