from typing import Iterable


def get_index_range(index_values: Iterable[int]) -> range:
    """compute the range of index values for a certain dimension."""
    return range(min(index_values) - 1, max(index_values) + 2)