def get_feature_index(feature: int | slice) -> int | slice:
    """
    Returns a modified feature index: in case of a slice of size 1, returns the corresponding integer. In case
    of a slice with missing params, tries to fill them. Otherwise, returns the same value (integer or slice) as passed.

    :param feature: The index or slice representing a feature to attack
    :return: An integer representing a single column index or a slice representing a multi-column index
    """
    if isinstance(feature, int):
        return feature

    start = feature.start
    stop = feature.stop
    step = feature.step
    if start is None:
        start = 0
    if step is None:
        step = 1
    if stop is not None and ((stop - start) // step) == 1:
        return start

    return slice(start, stop, step)

    Returns a modified feature index: in case of a slice of size 1, returns the corresponding integer. In case
    of a slice with missing params, tries to fill them. Otherwise, returns the same value (integer or slice) as passed.

    :param feature: The index or slice representing a feature to attack
    :return: An integer representing a single column index or a slice representing a multi-column index
    
art/utils.py