bpo-44353: Refactor typing.NewType into callable class (GH-27250) (#27258)

(cherry picked from commit 965dd76e9060e27e2253ba8c8d21a142b178720d)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
3 files changed