def slice_func(list_in, filter_str=None):
    """Utility to slice a list with a function of string parameter

    Parameters
    ----------
    list_in : list
        input string to slice
    filter_str : None or str
        filter to apply represented by a string [None -> no filter, input list]

    Returns
    -------
    Sliced list

    """
    if filter_str is None:
        return list_in
    assert isinstance(list_in, list), "`list_in` should be a list"
    list_out = list_in[
        slice(
            *map(lambda x: int(x.strip()) if x.strip() else None, filter_str.split(":"))
        )
    ]
    return list_out