TYP use typed version of namedtuple
Instead of
```python
OutputKey = collections.namedtuple("OutputKey", ["label", "position"])
```

we can do
```python
from typing import NamedTuple

class OutputKey(NamedTuple)
    label
    position
```

The advantage is that like this we can add type hints to the various elements, such as
```python
from typing import NamedTuple

class OutputKey(NamedTuple)
    label: Hashable
    position: int
```

-----

See https://docs.python.org/3/library/typing.html#typing.NamedTuple for reference