Allow customisation of `KeyRegion`

Allows specification of additional fields in the output which are
to be filled with functions expected a keyspace and a subvertex index.
flake8
Neaten KeyRegion class.