def METHOD_NAME(name: str) -> str:
    """Slugifies the name to produce OL url slugs
    XXX This is duplicated from openlibrary.core.helpers because there
    isn't a great way to import the methods from openlibrary as a
    package
    """
    # unsafe chars according to RFC 2396
    reserved = ";/?:@&=+$,"
    delims = '<>#%"'
    unwise = "{}|\\^[]`"
    space = ' \n\r'
    unsafe = reserved + delims + unwise + space
    pattern = f"[{''.join(re.escape(c) for c in unsafe)}]+"
    safepath_re = re.compile(pattern)
    return safepath_re.sub('_', name).replace(' ', '-').strip('_')[:100]