Sorry for overly broad answer, but the current functionality almost provides this, but it is not still quite working when you really want to find a good interval tree or balanced binary tree implementation for Python for example. Use of Cython or C library bindings could be filtering options for example. To generalise, it would be good to be able to find a performant or extendable library, or both.
Also very important thing is that the library is maintained, has more than one contributor etc.