<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wikipedia_slugify(value, do_unidecode=False):
 """ Converts to ASCII via unidecode. Converts spaces to underscore. Removes characters that aren't alphanumerics, underscores, or hyphens. Preserve case. Also strips leading and trailing whitespace. """

    if do_unidecode:
        value = unidecode(value)
    value = value.strip()
    return mark_safe(re.sub('[\s/#\?:@]+', '_', value))