<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def walk_cgroups(cgroup, action, opaque):
 """ The function applies the action function with the opaque object to each control group under the cgroup recursively. """

    action(cgroup, opaque)
    for child in cgroup.childs:
        walk_cgroups(child, action, opaque)