When Python `if/else` Stays: Eager vs. Graph Context
AutoGraph transforms Python's `if/else` to `tf.cond` only when the condition depends on a TensorFlow tensor for graph-time execution; otherwise, Python's native `if/else` is used for eager evaluation during tracing or for non-tensor conditions.