code: def score_ll(self, sequences):
          r
          counts, mapping = _transition_counts(sequences)
          if not set(self.mapping_.keys()).issuperset(mapping.keys()):
              return -np.inf
          inverse_mapping = {v: k for k, v in mapping.items()}
  
          # maps indices in counts to indices in transmat
          m2 = _dict_compose(inverse_mapping, self.mapping_)
          indices = [e[1] for e in sorted(m2.items())]
  
          transmat_slice = self.transmat_[np.ix_(indices, indices)]
          return np.nansum(np.log(transmat_slice) * counts)
docs: r"""log of the likelihood of sequences with respect to the model
  
          Parameters
          ----------
          sequences : list of array-like
              List of sequences, or a single sequence. Each sequence should be a
              1D iterable of state labels. Labels can be integers, strings, or
              other orderable objects.
  
          Returns
          -------
          loglikelihood : float
              The natural log of the likelihood, computed as
              :math:`\sum_{ij} C_{ij} \log(P_{ij})`
              where C is a matrix of counts computed from the input sequences.