<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ifelse(arg, true_expr, false_expr):
 """ Shorthand for implementing ternary expressions bool_expr.ifelse(0, 1) e.g., in SQL: CASE WHEN bool_expr THEN 0 else 1 END """

    # Result will be the result of promotion of true/false exprs. These
    # might be conflicting types; same type resolution as case expressions
    # must be used.
    case = ops.SearchedCaseBuilder()
    return case.when(arg, true_expr).else_(false_expr).end()