def lol_tuples(head, ind, values, dummies):
    if not ind:
        return head
    if ind[0] not in dummies:
        return lol_tuples(head + (values[ind[0]],), ind[1:], values, dummies)
    else:
        return [lol_tuples(head + (v,), ind[1:], values, dummies)
                for v in dummies[ind[0]]]
Try to create a model instance that violates a FK constraint. If it
dataset/ETHPy150Open dask/dask/dask/array/core.py/lol_tuples--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/tests/regressiontests/backends/tests.py/FkConstraintsTests.test_integrity_checks_on_creation