code: def __init__(self, intervals):
      self.intervals = tuple(intervals)
      self.offsets = [0]
      for u, v in self.intervals:
          self.offsets.append(self.offsets[-1] + v - u + 1)
      self.size = self.offsets.pop()
  
file_path: catboost/contrib/python/hypothesis/py2/hypothesis/internal/intervalsets.py
imports: from __future__ import absolute_import, division, print_function
label_desc: Use image node_id 1 to create a new IntervalSet object from inherited base classes: object with example: obj = IntervalSet(intervals)