Did I find the right examples for you? yes no

# cogent.struct.knots.nussinov_restricted

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

```from cogent.util.dict2d import Dict2D
from cogent.struct.rna2d import Pairs
from cogent.struct.knots import PairedRegion, PairedRegionFromPairs,\
PairedRegions, PairedRegionsFromPairs, ConflictMatrix,\
opt_all, contains_true, empty_matrix,\
```
```    def test_nussinov_restricted(self):
"""nussinov_restricted: basic test"""
p = Pairs([(0,7),(1,6),(2,5),(3,9),(4,8)])
obs = nussinov_restricted(p)
obs_rem = nussinov_restricted(p, return_removed=True)
```
```    def test_nussinov_restricted_bi(self):
"""nussinov_restricted: include bifurcation"""
p = Pairs([(0,7),(1,6),(2,14),(3,13),(4,12),(5,11),\
(8,17),(9,16),(10,15)])
obs = nussinov_restricted(p)
obs_rem = nussinov_restricted(p, return_removed=True)
```

```from cogent.util.dict2d import Dict2D
from cogent.struct.rna2d import Pairs
from cogent.struct.knots import PairedRegion, PairedRegionFromPairs,\
PairedRegions, PairedRegionsFromPairs, ConflictMatrix,\
opt_all, contains_true, empty_matrix,\
```
```    def test_nussinov_restricted(self):
"""nussinov_restricted: basic test"""
p = Pairs([(0,7),(1,6),(2,5),(3,9),(4,8)])
obs = nussinov_restricted(p)
obs_rem = nussinov_restricted(p, return_removed=True)
```
```    def test_nussinov_restricted_bi(self):
"""nussinov_restricted: include bifurcation"""
p = Pairs([(0,7),(1,6),(2,14),(3,13),(4,12),(5,11),\
(8,17),(9,16),(10,15)])
obs = nussinov_restricted(p)
obs_rem = nussinov_restricted(p, return_removed=True)
```