def cb_bands(ctx, param, value):

    """
    Click callback for parsing and validating `--bands`.

    Parameters
    ----------
    ctx : click.Context
        Ignored.
    param : click.Parameter
        Ignored.
    value : str
        See the decorator for `--bands`.

    Returns
    -------
    tuple
        Band indexes to process.
    """

    if value is None:
        return value
    else:
        return sorted([int(i) for i in value.split(',')])