Python Hard
```
class Solution:
    def numberOfUniqueGoodSubsequences(self, binary: str) -> int:
        MOD = 10 ** 9 + 7
        zeroes = 0

        ones = 0
        for x in binary:
            if x == "0":
                zeroes += ones
            if x == "1":
                ones += zeroes + 1

        return (ones + zeroes + int("0" in binary)) % MOD
        
```
['Python3']