def METHOD_NAME(sender, logentry, **kwargs):
    if not logentry.action_type.startswith('pretix.plugins.badges.layout') or not isinstance(logentry.content_object,
                                                                                             BadgeLayout):
        return
    a_text = _('Badge layout {val}')
    a_map = {
        'href': reverse('plugins:badges:edit', kwargs={
            'event': sender.slug,
            'organizer': sender.organizer.slug,
            'layout': logentry.content_object.id
        }),
        'val': escape(logentry.content_object.name),
    }
    a_map['val'] = '<a href="{href}">{val}</a>'.format_map(a_map)
    return a_text.format_map(a_map)