easy python3
\nclass Solution:\n    def numberOfUniqueGoodSubsequences(self, binary: str) -> int:\n        d=defaultdict(int)\n        i=0;mod=(10**9)+7\n        su=0;j=0\n 
```\nclass Solution:\n    def numberOfUniqueGoodSubsequences(self, binary: str) -> int:\n        d=defaultdict(int)\n        i=0;mod=(10**9)+7\n        su=0;j=0\n        print(len(binary))\n        while i<len(binary) and binary[i]!="1":i+=1;j=1\n        if i<len(binary):\n            su=1;i+=1\n        while i<len (binary):\n            if binary[i]=="1":\n                tmp=su*2\n                full=tmp-d[1]\n                d[1]+=full-su\n                su=full\n            else:\n                tmp=su*2\n                full=tmp-d[0]\n                d[0]+=full-su\n                su=full\n            i+=1\n        return (su+1)%mod if j==1 or d[0]>0 else su%mod \n            \n            \n            \n```
[]