Similarly to the comment above, this could be 
```
iterator(split.prev, context).filter { x =>
  val z = rand.nextDouble
  z < lower || z >= upper
}
```