'Return the next series index for the specified series, taking into account the various preferences that
control next series number generation.
:param field: The series-like field (defaults to the builtin series column)
:param current_indices: If True, returns a mapping of book_id to current series_index value instead.'

@read_api
def get_next_series_num_for(self, series, field=u'series', current_indices=False):

    books = ()
    sf = self.fields[field]
    if series:
        q = icu_lower(series)
        for (val, book_ids) in sf.iter_searchable_values(self._get_proxy_metadata, frozenset(self._all_book_ids())):
            if (q == icu_lower(val)):
                books = book_ids
                break
    idf = sf.index_field
    index_map = {book_id: self._fast_field_for(idf, book_id, default_value=1.0) for book_id in books}
    if current_indices:
        return index_map
    series_indices = sorted(index_map.itervalues())
    return _get_next_series_num_for_list(tuple(series_indices), unwrap=False)
