Implement the function count_abc_subsequences which takes a string s composed of characters 'a', 'b', 'c', and '?' and returns the number of distinct subsequences that can be formed which specifically contain the sequence "abc". The function must handle the presence of '?' characters, which can represent 'a', 'b', or 'c'. The result should be returned modulo (10^9 + 7).
Input/Output Requirements
Input: A string s where:
(1 \leq |s| \leq 10^5)
Each character in s is either 'a', 'b', 'c', or '?'.
Output: An integer representing the count of distinct subsequences that form "abc", modulo (10^9 + 7).
Implementation
The solution must be written in a file named /app/solution.py and contain the following code structure:
python
def count_abc_subsequences(s: str, mod: int = 10**9 + 7) -> int:
# Implementation goes here
Ensure that the solution handles large inputs efficiently and adheres to the specified input and output constraints.