Any utility to get the real *nn.module* for (non-)distributed setting?

Hello all, I wonder if there is a utility that can get the real nn.Module after model = accelerate.prepare(model). For example, when I am doing RL, I want to access the model.generate method, but in distributed mode the it is wrapped as model.module.generate. Does accelerate provide such a utility that can retrieve the nn.Module regardless of whether it is wrapped or not?

I found it: Helpful Utilities. Question solved.