In Python <= 3.8, if you run:
from collections import namedtuple
MyClass = namedtuple("MyClass", "")
m = MyClass()
print(m.__class__['__name__'])
print(type(m.__class__['__name__']))
It will raise TypeError in:
print(m.__class__['__name__'])
In Python 3.9 it prints:
types.GenericAlias