code: def M(self):
          
          N = self.N
          tig_to_idx = self.tig_to_idx
          M = np.zeros((N, N), dtype=int)
          for (at, bt), links in self.contacts.items():
              if not (at in tig_to_idx and bt in tig_to_idx):
                  continue
              ai = tig_to_idx[at]
              bi = tig_to_idx[bt]
              M[ai, bi] = M[bi, ai] = links
          return M
docs: Contact frequency matrix. Each cell contains how many inter-contig
          links between i-th and j-th contigs.