<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lm_freqs_taus(**kwargs):
 """ Take input_params and return dictionaries with frequencies and damping times of each overtone of a specific lm mode, checking that all of them are given. """

    lmns = kwargs['lmns']
    freqs, taus = {}, {}

    for lmn in lmns:
        l, m, nmodes = int(lmn[0]), int(lmn[1]), int(lmn[2])
        for n in range(nmodes):
            try:
                freqs['%d%d%d' %(l,m,n)] = kwargs['f_%d%d%d' %(l,m,n)]
            except KeyError:
                raise ValueError('f_%d%d%d is required' %(l,m,n))
            try:
                taus['%d%d%d' %(l,m,n)] = kwargs['tau_%d%d%d' %(l,m,n)]
            except KeyError:
                raise ValueError('tau_%d%d%d is required' %(l,m,n))

    return freqs, taus