class_docstr: Matrix similarity
      
code: def __init__(
      self,
      mat=None,
      mismatch_cost: int = 0,
      match_cost: int = 1,
      symmetric: bool = True,
      external: bool = True,
  ) -> None:
      self.mat = mat
      self.mismatch_cost = mismatch_cost
      self.match_cost = match_cost
      self.symmetric = symmetric
  
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 1 to create a new Matrix object from inherited base classes: _BaseSimilarity with example: obj = Matrix(mat, mismatch_cost, match_cost, symmetric, external)