class_docstr: Class to convert between character offsets in a text string, and pairs (line, column) of 1-based
  line and 0-based column numbers, as used by tokens and AST nodes.
  
  This class expects unicode for input and stores positions in unicode. But it supports
  translating to and from utf8 offsets, which are used by ast parsing.
docstr: Converts 0-based character offset to pair (line, col) of 1-based line and 0-based column
  numbers.
docstr_tok: ["Converts","0-based","character","offset","to","pair","(","line",",","col",")","of","1-based","line","and","0-based","column","numbers","."]
code: def offset_to_line(self, offset):
      # type: (int) -> Tuple[int, int]
      """
      Converts 0-based character offset to pair (line, col) of 1-based line and 0-based column
      numbers.
      """
      offset = max(0, min(self._text_len, offset))
      line_index = bisect.bisect_right(self._line_offsets, offset) - 1
      return (line_index + 1, offset - self._line_offsets[line_index])
  
file_path: catboost/contrib/python/asttokens/asttokens/line_numbers.py
imports: import bisect
  import re
  from typing import Dict, List, Tuple
label_desc: Use image node_id 4 for calling the LineNumbers obj's underlying member method code with example usage: obj.offset_to_line(offset) and returns: unknown,  unknown