def blockcut(expr, rowsizes, colsizes):

    rowbounds = bounds(rowsizes)
    colbounds = bounds(colsizes)
    return BlockMatrix([[MatrixSlice(expr, rowbound, colbound)
                         for colbound in colbounds]
                         for rowbound in rowbounds])
In a unique together validation, one field may be non-unique
dataset/ETHPy150Open sympy/sympy/sympy/matrices/expressions/blockmatrix.py/blockcut--crossover with--dataset/ETHPy150Open umutbozkurt/django-rest-framework-mongoengine/tests/test_validators.py/TestUniqueTogetherValidation.test_is_unique_together