context manager for seeding, or generating fixed random tensor.
# 🚀 Feature request

context manager for torch random seed, where the seed is fixed only inside 


## Motivation

in some integration test, an input required is very large to be hardcoded, and the ids_tensor provide only int32 examples.
However to fix this input either we can use NumPy seed, but probably it will compromise the randomness of other parts of the test.
I think a context manager where the seed is fixed only inside, it would benefit alot.

example of issues needing large fixed tensors as input #9951 #9954 


if there's any alternative please suggest?
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.