Describe a time you had to handle concurrent updates to user balances or transactions under time pressure.
Implement settle_transfers(initial_balances, transfers). The input is a map from account identifiers to integer balances and an array of transfer records. Ignore repeated deliveries of the same transaction ID, process unique transfers by ascending timestamp and then ID, apply only valid transfers with sufficient funds, and return final balances plus accepted and rejected transaction IDs.
def settle_transfers(initial_balances, transfers):