code: def levenshtein_distance(s1, s2):
      _check_type(s1)
      _check_type(s2)
  
      if s1 == s2:
          return 0
      rows = len(s1) + 1
      cols = len(s2) + 1
  
      if not s1:
          return cols - 1
      if not s2:
          return rows - 1
  
      prev = None
      cur = range(cols)
      for r in range(1, rows):
          prev, cur = cur, [r] + [0] * (cols - 1)
          for c in range(1, cols):
              deletion = prev[c] + 1
              insertion = cur[c - 1] + 1
              edit = prev[c - 1] + (0 if s1[r - 1] == s2[c - 1] else 1)
              cur[c] = min(edit, deletion, insertion)
  
      return cur[-1]
  
file_path: jellyfish/python/jellyfish/_jellyfish.py
imports: import unicodedata
  from collections import defaultdict
  from itertools import zip_longest
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: levenshtein_distance(s1, s2) and returns: cur, int, unknown, unknown