comefrom: <doocs>1508.Range Sum of Sorted Subarray Sums_1.py
code: def rangeSum( nums: List[int], n: int, left: int, right: int) -> int:
      arr = []
      for i in range(n):
          s = 0
          for j in range(i, n):
              s += nums[j]
              arr.append(s)
      arr.sort()
      MOD = 10**9 + 7
      return sum(arr[left - 1 : right]) % MOD
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : int , var_2 : int , var_3 : int ) -> int :
      var_4 = [ ]
      for var_5 in range ( var_1 ) :
          var_6 = 0
          for var_7 in range ( var_5 , var_1 ) :
              var_6 += var_0 [ var_7 ]
              var_4.append ( var_6 )
      var_4.sort ( )
      var_8 = 10 ** 9 + 7
      return sum ( var_4 [ var_2 - 1 : var_3 ] ) % var_8
  