Add some comments and type annotations for `_update_outliers_txn`.