from typing import Iterable


def filter_with_overlap(image_labels: Iterable[int], new_labels: Iterable[int], *args, **kwargs) -> bool:
    """Returns whether the current image must be maintained or discarded for the given step,
    based on the labels on the current image and the labels required at the step.

    Args:
        image_labels (List[int]): indices of the labels present in the current image
        new_labels (List[int]): indices of the labels needed at the current step

    Returns:
        bool: true if any of the current labels are present, false otherwise
    """
    return any(x in new_labels for x in image_labels)