def _get_column_and_bindparam(left, right, operator):
    """Return left and right expressions in (Column, BindParameter) order."""
    if not isinstance(left, Column):
        left, right = right, left
    if not isinstance(left, Column):
        raise AssertionError(
            u'SQLAlchemy operator {} expects Column as left side the of expression, got {} '
            u'of type {} instead.'.format(operator, left, type(left)))
    if not isinstance(right, BindParameter):
        raise AssertionError(
            u'SQLAlchemy operator {} expects BindParameter as the right side of the expression, '
            u'got {} of type {} instead.'.format(operator, right, type(right)))
    return left, right