def bool_to_int(labels: list) -> list:
    """
    Turn a list of 0s and 1s into a list whose values are the indices of 1s.
    Used to create a valid Kaggle submission.
    E.g. [1, 0, 0, 1, 1] -> [0, 3, 4]
    """
    return [i for i, x in enumerate(labels) if x == 1]