<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lifetimes(self):
 r""" Lifetimes of states of the hidden transition matrix Returns ------- l : ndarray(nstates) state lifetimes in units of the input trajectory time step, :math:`p_{ii}` are the diagonal entries of the hidden transition matrix. """

        return -self._lag / np.log(np.diag(self.transition_matrix))