<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, fn):
 r"""Applies ``fn`` recursively to every child block as well as self. Parameters fn : callable Function to be applied to each submodule, of form `fn(block)`. Returns ------- this block """

        for cld in self._children.values():
            cld.apply(fn)
        fn(self)
        return self