code: def _edit_dist_backtrace(lev):
      i, j = len(lev) - 1, len(lev[0]) - 1
      alignment = [(i, j)]
  
      while (i, j) != (0, 0):
          directions = [
              (i - 1, j - 1),  # substitution
              (i - 1, j),  # skip s1
              (i, j - 1),  # skip s2
          ]
  
          direction_costs = (
              (
                  lev[i][j] if (i >= 0 and j >= 0) else float("inf"),
                  (i, j),
              )
              for i, j in directions
          )
          _, (i, j) = min(direction_costs, key=operator.itemgetter(0))
  
          alignment.append((i, j))
      return list(reversed(alignment))
  
file_path: nltk/nltk/metrics/distance.py
imports: import operator
  import warnings
label_desc: Use image node_id 5 for calling a global function with example usage: _edit_dist_backtrace(lev) and returns: list