[3.13] gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) (GH-122444)

(cherry picked from commit d27a53fc02a87e76066fc4e15ff1fff3922a482d)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
3 files changed