def find_invalid_venues(all_items):
    """Find venues assigned slots that aren't on the allowed list
       of blocks."""
    venues = {}
    for item in all_items:
        valid = False
        item_blocks = list(item.venue.blocks.all())
        for slot in item.slots.all():
            for block in item_blocks:
                if block == slot.get_block():
                    valid = True
                    break
        if not valid:
            venues.setdefault(item.venue, [])
            venues[item.venue].append(item)
    return venues.items()
