input: Write a python function to find the maximum sum subarray from a 2D array.
  assert max_sum_subarray([[1, -2, 3], [4, 5, -6], [7, 8, 9]]) == 19
  assert max_sum_subarray([[1, 2, -1], [-3, 4, 5], [6, -7, 8]]) == 18
  assert max_sum_subarray([[1, -1], [-1, 1]]) == 1
output: def max_sum_subarray(matrix):
      def kadane(arr):
          max_sum = current_sum = arr[0]
          for num in arr[1:]:
              current_sum = max(num, current_sum + num)
              max_sum = max(max_sum, current_sum)
          return max_sum
  
      rows = len(matrix)
      cols = len(matrix[0])
      max_sum = float('-inf')
  
      for left in range(cols):
          temp = [0] * rows
          for right in range(left, cols):
              for i in range(rows):
                  temp[i] += matrix[i][right]
              max_sum = max(max_sum, kadane(temp))
  
      return max_sum