def METHOD_NAME(sender, **kwargs):
    def _visible(event):
        return event.has_feature('surveys') and query_active_surveys(event).has_rows()
    return MenuEntryData(_('Surveys'), 'surveys', 'surveys.display_survey_list', position=12, visible=_visible)