def get_image_by_id(data_set, img_id):
    """
    get an image from the dataset by giving the id in the dataset
    """
    for image in data_set:
        if image.img_id is img_id:
            return image