<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_term_proportions(dtm):
 """ Return the term proportions given the document-term matrix `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()