'Allows to edit existing index.
Previous working version will be saved with ``_last`` suffix (see :py:meth:`.revert_index`
:param bool reindex: should be the index reindexed after change
:returns: index name'

def edit_index(self, index, reindex=False, ind_kwargs=None):

    if (ind_kwargs is None):
        ind_kwargs = {}
    (ind_obj, name) = self.__write_index(index, (-1), edit=True)
    old = next((x for x in self.indexes if (x.name == name)))
    old.close_index()
    index_of_index = self.indexes.index(old)
    ind_obj.open_index()
    self.indexes[index_of_index] = ind_obj
    self.indexes_names[name] = ind_obj
    if reindex:
        self.reindex_index(name)
    return name
