code: def remove_interval_helper(self, interval, done, should_raise_error):
          
          #trace = interval.begin == 347 and interval.end == 353
          #if trace: print('\nRemoving from {} interval {}'.format(
          #   self.x_center, interval))
          if self.center_hit(interval):
              #if trace: print('Hit at {}'.format(self.x_center))
              if not should_raise_error and interval not in self.s_center:
                  done.append(1)
                  #if trace: print('Doing nothing.')
                  return self
              try:
                  # raises error if interval not present - this is
                  # desired.
                  self.s_center.remove(interval)
              except:
                  self.print_structure()
                  raise KeyError(interval)
              if self.s_center:     # keep this node
                  done.append(1)    # no rebalancing necessary
                  #if trace: print('Removed, no rebalancing.')
                  return self
  
              # If we reach here, no intervals are left in self.s_center.
              # So, prune self.
              return self.prune()
          else:  # interval not in s_center
              direction = self.hit_branch(interval)
  
              if not self[direction]:
                  if should_raise_error:
                      raise ValueError
                  done.append(1)
                  return self
  
              #if trace:
              #   print('Descending to {} branch'.format(
              #       ['left', 'right'][direction]
              #       ))
              self[direction] = self[direction].remove_interval_helper(interval, done, should_raise_error)
  
              # Clean up
              if not done:
                  #if trace:
                  #    print('Rotating {}'.format(self.x_center))
                  #    self.print_structure()
                  return self.rotate()
              return self
docs: Returns self after removing interval and balancing.
          If interval doesn't exist, raise ValueError.
  
          This method may set done to [1] to tell all callers that
          rebalancing has completed.
  
          See Eternally Confuzzled's jsw_remove_r function (lines 1-32)
          in his AVL tree article for reference.