Verifying that minibatch is actually randomly sampling

Can you provide a small fully reproducible script?