<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _emitHMM(self, token_type, past_states, past_emissions):
 """ emits a word based on previous tokens """

        assert token_type in self.emissions
        return utils.weighted_choice(self.emissions[token_type].items())