docstr: Inverse of char_in_shrink_order.
docstr_tok: ["Inverse","of","char_in_shrink_order","."]
code: def index_from_char_in_shrink_order(self, c: str) -> int:
      """
      Inverse of char_in_shrink_order.
      """
      assert len(c) == 1
      i = self.index(ord(c))
  
      if i <= self._idx_of_Z:
          n = self._idx_of_Z - self._idx_of_zero
          # Rewrite [zero_point, Z_point] to [0, n].
          if self._idx_of_zero <= i <= self._idx_of_Z:
              i -= self._idx_of_zero
              assert 0 <= i <= n
          # Rewrite [zero_point, 0] to [n + 1, Z_point].
          else:
              i = self._idx_of_zero - i + n
              assert n + 1 <= i <= self._idx_of_Z
          assert 0 <= i <= self._idx_of_Z
  
      return i
  
file_path: catboost/contrib/python/hypothesis/py3/hypothesis/internal/intervalsets.py
imports: from typing import Union
label_desc: Use image node_id 17 for calling the IntervalSet obj's underlying member method code with example usage: obj.index_from_char_in_shrink_order(c) and returns: i