<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def predict_proba(self, X, lengths=None):
 """Compute the posterior probability for each state in the model. X : array-like, shape (n_samples, n_features) Feature matrix of individual samples. lengths : array-like of integers, shape (n_sequences, ), optional Lengths of the individual sequences in ``X``. The sum of these should be ``n_samples``. Returns ------- posteriors : array, shape (n_samples, n_components) State-membership probabilities for each sample from ``X``. """

        _, posteriors = self.score_samples(X, lengths)
        return posteriors