Disable global random generators during pipeline execution
Accessing a global random generator during pipeline execution probably means that the pipeline will not be reproducible when running in parallel with other pipelines doing the same.
Maybe we should temporarily monkey-patch Python random._inst and numpy.random.mtrand._rand during pipeline execution (in a context manager) to issue a warning or even raise an exception.
Ideally, primitives should construct their own numpy.random.RandomState instance from given random_seed and use that.
We should probably try this change and run it against all TA1 pipelines and see what happens.
One thing to maybe consider is that if one sets seed on the global random generator inside the primitive, and then restores it before control flow returns from the primitive, this could be a way to assure reproducibility. It is ugly, but could work. So we should somehow detect that? Or still warn/abort?