class_docstr: ABC for Language Models.
  
  Cannot be directly instantiated itself.
docstr: Helper method for retrieving counts for a given context.
  
  Assumes context has been checked and oov words in it masked.
  :type context: tuple(str) or None
docstr_tok: ["Helper","method","for","retrieving","counts","for","a","given","context",".","Assumes","context","has","been","checked","and","oov","words","in","it","masked",".",":","type","context",":","tuple","(","str",")","or","None"]
code: def context_counts(self, context):
      """Helper method for retrieving counts for a given context.
  
      Assumes context has been checked and oov words in it masked.
      :type context: tuple(str) or None
  
      """
      return (
          self.counts[len(context) + 1][context]
          if context
          else self.counts.unigrams
      )
  
imports: import random
  import warnings
  from abc import ABCMeta, abstractmethod
  from bisect import bisect
  from itertools import accumulate
  from nltk.lm.counter import NgramCounter
  from nltk.lm.util import log_base2
  from nltk.lm.vocabulary import Vocabulary
label_desc: Use image node_id 6 for calling the LanguageModel obj's underlying member method code with example usage: obj.context_counts(context) and returns: unknown