<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sollen(tex, command):
 r"""Measure solution length :param Union[str,buffer] tex: the LaTeX source as a string or file buffer :param str command: the command denoting a solution i.e., if the tex file uses '\answer{<answer here>}', then the command is 'answer'. :return int: the solution length """

    return sum(len(a.string) for a in TexSoup(tex).find_all(command))