mapKeys package:comfort-graph

The index map must be an injection, that is, nodes must not collaps. Also the node and edge index maps must be consistent, i.e.
from (edgeMap e) == nodeMap (from e)
to   (edgeMap e) == nodeMap (to   e)
Strictly spoken, we would need the node map only for isolated nodes, but we use it for all nodes for simplicity.