def METHOD_NAME(self, ngram_text):
    """Updates ngram counts from `ngram_text`.
    Expects `ngram_text` to be a sequence of sentences (sequences).
    Each sentence consists of ngrams as tuples of strings.
    :param Iterable(Iterable(tuple(str))) ngram_text: Text containing sentences of ngrams.
    :raises TypeError: if the ngrams are not tuples.
    """
    for sent in ngram_text:
        for ngram in sent:
            if not isinstance(ngram, tuple):
                raise TypeError(
                    "Ngram <{}> isn't a tuple, " "but {}".format(ngram, type(ngram))
                )
            ngram_order = len(ngram)
            if ngram_order == 1:
                self.unigrams[ngram[0]] += 1
                continue
            context, word = ngram[:-1], ngram[-1]
            self[ngram_order][context][word] += 1