<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Maximum sum subarray of size range [ L , R ]
Python3 program to find maximum sum subarray of size between L and R . ; Function to find maximum sum subarray of size between L and R ; Calculating prefix sum ; Maintain 0 for initial values of i upto R Once i = R , then we need to erase that 0 from our multiset as our first index of subarray cannot be 0 anymore . ; We maintain flag to counter if that initial 0 was erased from set or not . ; Erase 0 from multiset once i = b ; Insert pre [ i - L ] ; Find minimum value in multiset . ; Erase pre [ i - R ] ; Driver code

<ASSISTANT_TASK:>
Python Code:
import sys 
 def max_sum_subarray(arr , L , R ) : 
	 n = len(arr ) 
 pre = n *[0 ] 
 pre[0 ] = arr[0 ] 
 for i in range(1 , n ) : 
	 pre[i ] = pre[i - 1 ] + arr[i ] 
  s1 =[] 
 s1 . append(0 ) 
 ans = - sys . maxsize - 1 
 ans = max(ans , pre[L - 1 ] ) 
 flag = 0 
 for i in range(L , n ) : 
	 if(i - R >= 0 ) : 
	 if(flag == 0 ) : 
	 s1 . remove(0 ) 
 flag = 1 
   if(i - L >= 0 ) : 
	 s1 . append(pre[i - L ] ) 
  ans = max(ans , pre[i ] - s1[0 ] ) 
 if(i - R >= 0 ) : 
	 s1 . remove(pre[i - R ] ) 
   print(ans ) 
  if __name__== "__main __": 
	 L = 1 
 R = 3 
 arr =[1 , 2 , 2 , 1 ] 
 max_sum_subarray(arr , L , R ) 
 
<END_TASK>
