<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _rapply(d, func, *args, **kwargs):
 """Apply a function to all values in a dictionary or list of dictionaries, recursively."""

    if isinstance(d, (tuple, list)):
        return [_rapply(each, func, *args, **kwargs) for each in d]
    if isinstance(d, dict):
        return {
            key: _rapply(value, func, *args, **kwargs) for key, value in iteritems(d)
        }
    else:
        return func(d, *args, **kwargs)