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 1-based line number and 0-based column to 0-based character offset into text.
docstr_tok: ["Converts","1-based","line","number","and","0-based","column","to","0-based","character","offset","into","text","."]
code: def line_to_offset(self, line, column):
      # type: (int, int) -> int
      """
      Converts 1-based line number and 0-based column to 0-based character offset into text.
      """
      line -= 1
      if line >= len(self._line_offsets):
          return self._text_len
      elif line < 0:
          return 0
      else:
          return min(
              self._line_offsets[line] + max(0, column), self._text_len
          )
  
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 3 for calling the LineNumbers obj's underlying member method code with example usage: obj.line_to_offset(line, column) and returns: self, int, min