Find the first pair in an array that sums to a specific target number.
Implement def first_pair_sum(nums, target):. Return the two zero-based indices in ascending order. Scan from left to right, and return the first pair whose second index is encountered; if no pair exists, return []. Each array element may be used at most once. The input is an integer array and an integer target, and the output is a two-element list of integers or an empty list.
def first_pair_sum(nums, target):