code: def if_then_else(
      condition: Union[bool, Expression[bool]], if_true, if_false
  ) -> Expression:
      """
      Ternary conditional operator that decides which of two other expressions should be evaluated
      based on a evaluated boolean condition.
  
      e.g. if_then_else(col("f0") > 5, "A", "B") leads to "A"
  
      :param condition: condition boolean condition
      :param if_true: expression to be evaluated if condition holds
      :param if_false: expression to be evaluated if condition does not hold
      """
      return _ternary_op("ifThenElse", condition, if_true, if_false)
  
imports: from typing import Union
  from pyflink import add_version_doc
  from pyflink.java_gateway import get_gateway
  from pyflink.table.expression import Expression, _get_java_expression, TimePointUnit, JsonOnNull
  from pyflink.table.types import _to_java_data_type, DataType
  from pyflink.table.udf import UserDefinedFunctionWrapper
  from pyflink.util.java_utils import to_jarray, load_java_class
label_desc: Use image node_id 47 for calling a global function with example usage: if_then_else(condition, if_true, if_false) and returns: _ternary_op