class_docstr: Compute the absolute Damerau-Levenshtein distance between the two sequences.
  The Damerau-Levenshtein distance is the minimum number of edit operations necessary
  for transforming one sequence into the other. The edit operations allowed are:
  
      * deletion:      ABC -> BC, AC, AB
      * insertion:     ABC -> ABCD, EABC, AEBC..
      * substitution:  ABC -> ABE, ADC, FBC..
      * transposition: ABC -> ACB, BAC
  
  If `restricted=False`, it will calculate unrestricted distance,
  where the same character can be touched more than once.
  So the distance between BA and ACB is 2: BA -> AB -> ACB.
  
  https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance
class_docstr_tok: ["Compute","the","absolute","Damerau-Levenshtein","distance","between","the","two","sequences",".","The","Damerau-Levenshtein","distance","is","the","minimum","number","of","edit","operations","necessary","for","transforming","one","sequence","into","the","other",".","The","edit","operations","allowed","are",":","*","deletion",":","ABC","-",">","BC",",","AC",",","AB","*","insertion",":","ABC","-",">","ABCD",",","EABC",",","AEBC","..","*","substitution",":","ABC","-",">","ABE",",","ADC",",","FBC","..","*","transposition",":","ABC","-",">","ACB",",","BAC","If","`","restricted=False","`",",","it","will","calculate","unrestricted","distance",",","where","the","same","character","can","be","touched","more","than","once",".","So","the","distance","between","BA","and","ACB","is","2",":","BA","-",">","AB","-",">","ACB",".","https",":","\/\/en.wikipedia.org\/wiki\/Damerau","%","E2","%","80","%","93Levenshtein_distance"]
code: def __init__(
      self,
      qval: int = 1,
      test_func: TestFunc | None = None,
      external: bool = True,
      restricted: bool = True,
  ) -> None:
      self.qval = qval
      self.test_func = test_func or self._ident
      self.external = external
      self.restricted = restricted
  
imports: from __future__ import annotations
  from collections import defaultdict
  from itertools import zip_longest
  from typing import Any, Sequence, TypeVar
  from .base import Base, BaseSimilarity
  from .types import SimFunc, TestFunc
label_desc: Use image node_id 1 to create a new DamerauLevenshtein object from inherited base classes: _Base with example: obj = DamerauLevenshtein(qval, test_func, external, restricted)