def filter_images(images, filter_dict):
    """Takes a list of images and returns the subset of that list that meet the filter_dict's criteria."""
    filter_function = lambda image: \
        ("id" not in filter_dict or filter_dict["id"] == image.id) and \
        ("owner_id" not in filter_dict or filter_dict["owner_id"] == image.id) and \
        ("name" not in filter_dict or filter_dict["name"] == image.id) and \
        ("architecture" not in filter_dict or filter_dict["architecture"] == image.id)
    return filter(filter_function, images)
dataset/ETHPy150Open bmbouter/Opus/opus/lib/prov/drivers/driver_tools.py/filter_images/original