def test_contain_cat_and_dog(get_dataloaders):
    """Check that each dataset contains at least one dog and one cat"""
    train_loader, val_loader, test_loader = get_dataloaders

    def loader_check_labels(aDataLoader):
        found_0, found_1 = False, False
        for _, labels in iter(aDataLoader):
            set_labels = set(list(labels.numpy().flatten()))
            if 0 in set_labels:
                found_0 = True
            if 1 in set_labels:
                found_1 = True
            if found_0 and found_1:
                return True
        return False

    assert loader_check_labels(train_loader), "Train dataset doesn't contain all labels"
    assert loader_check_labels(test_loader), "Test dataset doesn't contain all labels"
    assert loader_check_labels(
        val_loader
    ), "Validation dataset doesn't contain all labels"