def METHOD_NAME(cls, column_A, column_B, **kwargs):
    row_wise_cond = sa.and_(
        sa.func.abs(column_A - column_B) == 3,
        sa.not_(sa.or_(column_A == None, column_B == None)),
    )
    return row_wise_cond