Use Python in retool loops

I have two Python functions, and each function needs to iterate through every row of the table. Additionally, I need to conditionally decide which function to run for each row.