Issue #25665: Make NamedTuple picklable.
diff --git a/Lib/typing.py b/Lib/typing.py
index 49c4a06..1757f13 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1479,6 +1479,11 @@
     fields = [(n, t) for n, t in fields]
     cls = collections.namedtuple(typename, [n for n, t in fields])
     cls._field_types = dict(fields)
+    # Set the module to the caller's module (otherwise it'd be 'typing').
+    try:
+        cls.__module__ = sys._getframe(1).f_globals.get('__name__', '__main__')
+    except (AttributeError, ValueError):
+        pass
     return cls