code: def token_sort_ratio(
      s1: str | Sequence[str], s2: str | Sequence[str]
  ) -> float:
      """
      Measure the similarity between two strings or sequences of strings
      using Levenshtein distance, only with non-alphanumeric characters removed
      and the ordering of tokens in each sorted before comparison.
  
      Args:
          s1
          s2
  
      Returns:
          Similarity between ``s1`` and ``s2`` in the interval [0.0, 1.0],
          where larger values correspond to more similar strings.
  
      See Also:
          :func:`textacy.similarity.edits.levenshtein()`
      """
      str1 = _to_prepared_str(s1)
      str2 = _to_prepared_str(s2)
      return edits.levenshtein(str1, str2)
  
imports: from __future__ import annotations
  from typing import Callable, Sequence
  from .None import edits
  from ..None import constants
label_desc: Use image node_id 1 for calling a global function with example usage: token_sort_ratio(s1, s2) and returns: edits