input: from typing import List
  
  def count_stable_binary_arrays(zeroes: int, ones: int, maxLength: int) -> int:
      """
      You are given three positive integers zeroes, ones, and maxLength.
  
      A binary array arr is considered stable if:
  
      The count of 0s in arr is exactly zeroes.
      The count of 1s in arr is exactly ones.
      Every subarray of arr with length greater than maxLength must contain both 0 and 1.
      Compute the total number of such stable binary arrays.
  
      Return the result modulo 10^9 + 7, since the answer could be very large.
  
      Examples:
      >>> zeroes = 1, ones = 1, maxLength = 2
      2
      >>> zeroes = 1, ones = 2, maxLength = 1
      1
      >>> zeroes = 3, ones = 3, maxLength = 2
      14
  
      Constraints:
      1 <= zeroes, ones, maxLength <= 200
      """
output:     
      MOD = 10**9 + 7
  
      def count_subarrays(arr, n, maxLength):
          start = 0
          last_seen = {'0': -1, '1': -1}
          count = 0
  
          for end in range(n):
              last_seen[arr[end]] = end
              while end - start + 1 > maxLength:
                  count += n - end
                  start = min(last_seen.values()) + 1
          return count
  
      def count_stable_binary_arrays_rec(zeroes, ones, maxLength):
          if zeroes == 0 and ones == 0:
              return 1
          if maxLength == 1:
              return 1
          if zeroes == 0 or ones == 0:
              return 0
  
          total = 0
          if maxLength >= zeroes + ones:
              total += 1
  
          if zeroes > 0:
              total += count_stable_binary_arrays_rec(zeroes - 1, ones, maxLength - 1)
          if ones > 0:
              total += count_stable_binary_arrays_rec(zeroes, ones - 1, maxLength - 1)
  
          return total % MOD
  
      return count_stable_binary_arrays_rec(zeroes, ones, maxLength)
  