Branching chooses one path based on a condition:
Check data
/ \
Valid Invalid
↓ ↓
Process AlertBranchPythonOperator (or TaskFlow branching) returns the task id(s) to follow; non-selected branches are skipped.
def choose_branch():
return "process" if data_is_valid else "alert"