docs: def recursive_build_tree(self, intervals):
          """
          recursively builds a BST based on the elementary intervals.
          each node is an array: [interval value, left descendent nodes, right descendent nodes, [ids]].
          nodes with no descendents have a -1 value in left/right descendent positions.
  
          for example, a node with two empty descendents:
              [500,                               interval value
                  [-1,-1,-1,['id5','id6']],       left descendent
                  [-1,-1,-1,['id4']],             right descendent
                  ['id1',id2',id3']]              data values
  
          """
          center = int(round(len(intervals) / 2))
  
          left = intervals[:center]
          right = intervals[center + 1:]
          node = intervals[center]
  
          if len(left) > 1:
              left = self.recursive_build_tree(left)
          elif len(left) == 1:
              left = [left[0],[-1,-1,-1,[]],[-1,-1,-1,[]],[]]
          else:
              left = [-1,-1,-1,[]]
  
          if len(right) > 1:
              right = self.recursive_build_tree(right)
          elif len(right) == 1:
              right = [right[0],[-1,-1,-1,[]],[-1,-1,-1,[]],[]]
          else:
              right = [-1,-1,-1,[]]
  
          return [node, left, right, []]