code: def apply(self, fn):
          r
          for cld in self._children.values():
              cld.apply(fn)
          fn(self)
          return self
docs: 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