code: def get_term_proportions(dtm):
      
      unnorm = get_term_frequencies(dtm)
  
      if unnorm.sum() == 0:
          raise ValueError('`dtm` does not contain any tokens (is all-zero)')
      else:
          return unnorm / unnorm.sum()
docs: Return the term proportions given the document-term matrix `dtm`