an python extension with C programming, implement interval tree data structure.