code: def sample_from_likelihood(self, n_timesteps=10):
          
  
          self.latent_state_sequences = lmap(
              lambda A: ltake(
                  n_timesteps,
                  iterate(
                      lambda s: pd.Series(A @ s.values, index=s.index), self.s0
                  ),
              ),
              self.transition_matrix_collection,
          )
  
          self.observed_state_sequences = [
              [self.sample_observed_state(s) for s in latent_state_sequence]
              for latent_state_sequence in self.latent_state_sequences
          ]
docs: Sample a collection of observed state sequences from the likelihood
          model given a collection of transition matrices.
  
          Args:
              n_timesteps: The number of timesteps for the sequences.