https://remp3indir.net/python-segment-tree-implementation/
python segment tree implementation