code: def test_translate_index_to_position(document):
      pos = document.translate_index_to_position(
          len("line 1\nline 2\nlin")
      )
  
      assert pos[0] == 2
      assert pos[1] == 3
  
      pos = document.translate_index_to_position(0)
      assert pos == (0, 0)
  
file_path: catboost/contrib/python/prompt-toolkit/py3/tests/test_document.py
imports: from __future__ import annotations
  import pytest
  from prompt_toolkit.document import Document
label_desc: Use image node_id 11 for calling a global function with example usage: test_translate_index_to_position(document) without return types