def find_free_slot(slots):
    """
    Find a free slot to update given a list of :class:`ImageSlot`.

    Returns
    -------
    (index, slot, image)

    Raises
    ------
    RuntimeError
        If no slots are available
    """
    for index, (slot, image) in enumerate(slots):
        if not slot.in_use:
            slot.in_use = True
            return index, slot, image

    raise RuntimeError('No buffers available')