<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Maximum subsequence sum such that all elements are K distance apart
Function to return the maximum subarray sum for the array { a [ i ] , a [ i + k ] , a [ i + 2 k ] , ... } ; Function to return the sum of the maximum required subsequence ; To store the result ; Run a loop from 0 to k ; Find the maximum subarray sum for the array { a [ i ] , a [ i + k ] , a [ i + 2 k ] , ... } ; Return the maximum value ; Driver code

<ASSISTANT_TASK:>
Python Code:
import sys 
 def maxSubArraySum(a , n , k , i ) : 
	 max_so_far = - sys . maxsize ; 
 max_ending_here = 0 ; 
 while(i < n ) : 
	 max_ending_here = max_ending_here + a[i ] ; 
 if(max_so_far < max_ending_here ) : 
	 max_so_far = max_ending_here ; 
  if(max_ending_here < 0 ) : 
	 max_ending_here = 0 ; 
  i += k ; 
  return max_so_far ; 
  def find(arr , n , k ) : 
	 maxSum = 0 ; 
 for i in range(0 , min(n , k ) + 1 ) : 
	 sum = 0 ; 
 maxSum = max(maxSum , maxSubArraySum(arr , n , k , i ) ) ; 
  return maxSum ; 
  if __name__== ' __main __' : 
	 arr =[2 , - 3 , - 1 , - 1 , 2 ] ; 
 n = len(arr ) ; 
 k = 2 ; 
 print(find(arr , n , k ) ) ; 
 
<END_TASK>
