Using typing.NamedTuple for immutable objects