A function that applies a given function to all submodules of an nn.Module, similar to map.
It traverses modules using postorder traversal, prioritizing the left child.
def do_something(m): # do something! return mmodel = #something very complex modelresult = model.apply(print_module)