input: from typing import List
  
  def total_power_of_subsequences(nums: List[int], k: int) -> int:
      """
      Given an array of integers nums of length n and a positive integer k.
      
      The power of an integer array is the count of subsequences whose sum equals k.
      
      Return the total power of all subsequences of nums, computed modulo 10^9 + 7.
      
      Examples:
      >>> nums = [1,2,3], k = 3
      6
      >>> nums = [2,3,3], k = 5
      4
      >>> nums = [1,2,3], k = 7
      0
  
      Constraints:
      1 <= n <= 100
      1 <= nums[i] <= 10^4
      1 <= k <= 100
      """
output:     MOD = 10**9 + 7
  
      def count_subsequences_with_sum(nums, target):
          n = len(nums)
          dp = [[0] * (target + 1) for _ in range(n + 1)]
          dp[0][0] = 1
  
          for i in range(1, n + 1):
              for sum_val in range(target + 1):
                  dp[i][sum_val] = dp[i-1][sum_val]
                  if sum_val >= nums[i-1]:
                      dp[i][sum_val] += dp[i-1][sum_val - nums[i-1]]
                      dp[i][sum_val] %= MOD
  
          return dp[n][target]
  
      total_power = 0
      for i in range(len(nums)):
          for j in range(i, len(nums)):
              total_power += count_subsequences_with_sum(nums[i:j+1], k)
              total_power %= MOD
  
      return total_power