docstr: Set intersection for lists of intervals.
docstr_tok: ["Set","intersection","for","lists","of","intervals","."]
code: def intersection(self, other):
      """Set intersection for lists of intervals."""
      assert isinstance(other, type(self)), other
      intervals = []
      i = j = 0
      while i < len(self.intervals) and j < len(other.intervals):
          u, v = self.intervals[i]
          U, V = other.intervals[j]
          if u > V:
              j += 1
          elif U > v:
              i += 1
          else:
              intervals.append((max(u, U), min(v, V)))
              if v < V:
                  i += 1
              else:
                  j += 1
      return IntervalSet(intervals)
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/intervalsets.py
imports: from typing import Union
label_desc: Use image node_id 15 for calling the IntervalSet obj's underlying member method code with example usage: obj.intersection(other) and returns: IntervalSet