This removes some boilerplate code, and also helps when using static type checkers like mypy. The typing.NamedTuple class was added with python 3.6 which is our min required python, so we are good.