Pytorch Training - Best Habits

I have seen a lot of pytorch code that defines a training function to take in the input and do the training but yet does not have a return statement (instead just modifies the model in place). Is it typically better practice to do this as opposed having a return statement that takes in a model and returns a model ?