<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def random_terms(self):
        '''Return dict of all and only random effects in model.'''
        return {k: v for (k, v) in self.terms.items() if v.random}