from typing import Iterable


def make_indices_str(indices: Iterable[int]) -> str:
    """Generate a string representation of an iterable of indices;
    if indices are contiguous, returns a string formatted like like
    '<min_idx> - <max_idx>', otherwise a string formatted like
    '[idx_1, idx_2, ..., idx_n'].
    """
    idcs = sorted(indices)
    contiguous = len(idcs) > 1 and (idcs[-1] - idcs[0] == len(idcs) - 1)
    return f"{idcs[0]} - {idcs[-1]}" if contiguous else f"{idcs}"