docs: def get_levenshtein(first, second):
      """\
      Get the Levenshtein distance between two strings.
  
      :param first:     the first string
      :param second:    the second string
      """
      if not first:
          return len(second)
  
      if not second:
          return len(first)
  
      prev_distances = range(0, len(second) + 1)
      curr_distances = None
  
      # Find the minimum edit distance between each substring of 'first' and
      # the entirety of 'second'. The first column of each distance list is
      # the distance from the current string to the empty string.
      for first_idx, first_char in enumerate(first, start=1):
          # Keep only the previous and current rows of the
          # lookup table in memory
          curr_distances = [first_idx]
  
          for second_idx, second_char in enumerate(second, start=1):
              # Take the max of the neighbors
              compare = [
                  prev_distances[second_idx - 1],
                  prev_distances[second_idx],
                  curr_distances[second_idx - 1],
              ]
  
              distance = min(*compare)
  
              if first_char != second_char:
                  distance += 1
  
              curr_distances.append(distance)
  
          prev_distances = curr_distances
  
      return curr_distances[-1]