code: def _maintain(self, node):
          
          # requires node and its direct descends to be clean
          l = 2 * node
          r = 2 * node + 1
          assert self.lazyset[node] is None
          assert self.lazyadd[node] == 0
          assert self.lazyset[l] is None
          assert self.lazyadd[l] == 0
          assert self.lazyset[r] is None
          assert self.lazyadd[r] == 0
          self.maxval[node] = max(self.maxval[l], self.maxval[r])
          self.minval[node] = min(self.minval[l], self.minval[r])
          self.sumval[node] = self.sumval[l] + self.sumval[r]
docs: maintains the invariant for the given node
          :promize: the lazy values are None/0 for this node