code: def index(self, value):
      for offset, (u, v) in zip(self.offsets, self.intervals):
          if u == value:
              return offset
          elif u > value:
              raise ValueError("%d is not in list" % (value,))
          if value <= v:
              return offset + (value - u)
      raise ValueError("%d is not in list" % (value,))
  
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 6 for calling the IntervalSet obj's underlying member method code with example usage: obj.index(value) and returns: offset, unknown