Given an array of integers, find the maximum sum of a contiguous subarray of size K.
Implement max_subarray_sum(nums, k), returning an integer. The subarray must contain exactly k consecutive elements, and 1 <= k <= len(nums).
def max_subarray_sum(nums, k):