from typing import List


def filter_without_overlap(current_labels: List[int], step_labels: List[int], previous_labels: List[int]) -> bool:
    """Filters out any image that contains data with no labels belonging to the current step, including
    those images that contain future labels (potentially dangerous if an image contains more or less every label).add()

    Args:
        current_labels (List[int]): indices of unique labels for the current image
        step_labels (List[int]): indices of labels for the step T
        previous_labels (List[int]): indices of labels from steps 1 .. T - 1 + labels from step T + [0, 255]

    Returns:
        bool: true whether the image must be kept, false otherwise
    """
    return any(x in step_labels for x in current_labels) and all(x in previous_labels for x in current_labels)