'initialize your data structure here.
:type nums: List[int]'

def __init__(self, nums):

    self.__nums = nums
    def buildHelper(nums, start, end):
        if (start > end):
            return None
        root = self._SegmentTreeNode(start, end, 0)
        if (start == end):
            root.sum = nums[start]
            return root
        root.left = buildHelper(nums, start, ((start + end) / 2))
        root.right = buildHelper(nums, (((start + end) / 2) + 1), end)
        root.sum = ((root.left.sum if root.left else 0) + (root.right.sum if root.right else 0))
        return root
    self.__root = buildHelper(nums, 0, (len(nums) - 1))
