Describe how you would implement a basic load-balancing logic for distributed inference requests.
Write a function that takes the current load on each worker and a list of request costs, then returns the worker index chosen for each request. For each request, assign it to the worker with the smallest current total load, breaking ties by smaller worker index, and then add that request's cost to that worker.
def balance_requests(worker_loads, requests):
worker_loads: list of integers, initial load per workerrequests: list of integers, cost of each incoming requestdef balance_requests(worker_loads, requests):