class_docstr: Matrix similarity
      
code: def __call__(self, *sequences: Sequence) -> int:
      if not self.mat:
          if self._ident(*sequences):
              return self.match_cost
          return self.mismatch_cost
  
      # search in matrix
      if sequences in self.mat:
          return self.mat[sequences]
      # search in symmetric matrix
      if self.symmetric:
          sequences = tuple(reversed(sequences))
          if sequences in self.mat:
              return self.mat[sequences]
      # if identity then return match_cost
      if self._ident(*sequences):
          return self.match_cost
      # not found
      return self.mismatch_cost
  
imports: from __future__ import annotations
  from itertools import takewhile
  from typing import Sequence
  from .base import Base, BaseSimilarity
  from .types import SimFunc
label_desc: Use image node_id 3 for calling the Matrix obj's underlying member method code with example usage: obj.__call__() and returns: self, self, self, self, self, self