code: def get_ratio(old: str, new: str) -> float:
      """Return a "similarity ratio" (in percent) representing the similarity
      between the two strings where 0 is equal and anything above less than equal.
      """
      if not all([old, new]):
          return VERSIONING_RATIO
  
      if IS_SPEEDUP:
          return Levenshtein.distance(old, new) / (len(old) / 100.0)
      else:
          return levenshtein_distance(old, new) / (len(old) / 100.0)
  
file_path: sphinx/sphinx/versioning.py
imports: from __future__ import annotations
  import pickle
  from itertools import product, zip_longest
  from operator import itemgetter
  from os import path
  from typing import TYPE_CHECKING, Any
  from uuid import uuid4
  from sphinx.transforms import SphinxTransform
label_desc: Use image node_id 3 for calling a global function with example usage: get_ratio(old, new) and returns: VERSIONING_RATIO, unknown, unknown