'Return a key for `index` from the source model into
the _source_offset map. The key is a tuple of row indices on
the path from the top if the model to the `index`.'

def _indexKey(self, index):

    key_path = []
    parent = index
    while parent.isValid():
        key_path.append(parent.row())
        parent = parent.parent()
    return tuple(reversed(key_path))
