code: def _tf_if_exp(cond, if_true, if_false, expr_repr):
      """Overload of if_exp that stages a TF cond."""
      # TODO(mdan): Use nonlocal once we no longer need to support py2.
      true_val = []
      false_val = []
  
      def true_fn():
          true_val.append(if_true())
          if true_val and false_val:
              control_flow.verify_single_cond_var(
                  expr_repr, true_val[0], false_val[0]
              )
          return true_val[0]
  
      def false_fn():
          false_val.append(if_false())
          if true_val and false_val:
              control_flow.verify_single_cond_var(
                  expr_repr, true_val[0], false_val[0]
              )
          return false_val[0]
  
      return tf_cond.cond(cond, true_fn, false_fn)
  
imports: from tensorflow.python.autograph.operators import control_flow
  from tensorflow.python.autograph.utils import tensors
  from tensorflow.python.ops import cond
label_desc: Use image node_id 2 for calling a global function with example usage: _tf_if_exp(cond, if_true, if_false, expr_repr) and returns: tf_cond, true_val, false_val