code: def slugify(value: str, separator: str, unicode: bool = False) -> str:
      """Slugify a string, to make it URL friendly."""
      if not unicode:
          # Replace Extended Latin characters with ASCII, i.e. `žlutý` => `zluty`
          value = unicodedata.normalize("NFKD", value)
          value = value.encode("ascii", "ignore").decode("ascii")
      value = re.sub(r"[^\w\s-]", "", value).strip().lower()
      return re.sub(r"[{}\s]+".format(separator), separator, value)
  
imports: from __future__ import annotations
  from .None import Extension
  from ..treeprocessors import Treeprocessor
  from ..util import code_escape, parseBoolValue, AMP_SUBSTITUTE, HTML_PLACEHOLDER_RE, AtomicString
  from ..treeprocessors import UnescapeTreeprocessor
  import re
  import html
  import unicodedata
  import xml.etree.ElementTree
  from typing import TYPE_CHECKING, Any, Iterator, MutableSet
label_desc: Use image node_id 1 for calling a global function with example usage: slugify(value, separator, unicode) and returns: re