Using aggregators to "loop" over rows

I see that the built-in aggregation functions support operations like summing and counting, but I just want to loop over my rows. Each row has many columns but there are 4 columns I need to pull out, pass to an external function, and annotate that row with the result.

Is this possible to do with aggregation functions?

Hail does not support user-defined functions at the moment, nor is this planned in the near future. What specifically does this external function do? It may be possible to write it in terms of the exposed functions and aggregators.

I want to do a one-sided fisher exact test. I see that hail has the function fisher_exact_test, however it only supports two-sided. I was hoping to be able to use the Scipy implementation, but it sounds like that is not possible.