<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_probability(self, sentence):
 """ Calculate the probability of a sentence, given this language model. Parameters sentence : list A list of strings / tokens. """

        if len(sentence) == 1:
            return Decimal(10)**self.get_unigram_log_prob(sentence)
        elif len(sentence) == 2:
            return Decimal(10)**self.get_bigram_log_prob(sentence)
        else:
            log_prob = Decimal(0.0)
            for w1, w2, w3 in zip(sentence, sentence[1:], sentence[2:]):
                log_prob += self.get_trigram_log_prob((w1, w2, w3))
            log_prob = Decimal(log_prob)
            return Decimal(10)**log_prob