This might be asking for a lot, but do you think you can stub out the src code for me? Or link me to an article that explains how this is done?
If I had to guess, it might be something like
torch.randn(len(x)) * std_dev + x_mean

Since torch rand uses normal distribution under the hood. However, doesn’t that imply that the elements of x is not relevant?