docs: def add(self, ranges):
          r"""Add a single (or many) [start, end, \*] item to the tree."""
          if len(ranges) and isinstance(ranges[0], int_types):
              ranges = [ranges]
          iset = self._iset
          self._maxlen = max(self._maxlen, max(r[1] - r[0] + 1 for r in ranges))
  
          if len(ranges) > 30 or len(iset) < len(ranges):
              iset.extend(ranges)
              iset.sort()
          else:
              for o in ranges:
                  iset.insert(binsearch_left_start(iset, o[0], 0, len(iset)), o)