code: def check_offsets(doc, expected_offsets):
      """
      Compare the start_char and end_char of the tokens in the doc with the given list of list of offsets
      """
      assert len(doc.sentences) == len(expected_offsets)
      for sentence, offsets in zip(doc.sentences, expected_offsets):
          assert len(sentence.tokens) == len(offsets)
          for token, offset in zip(sentence.tokens, offsets):
              assert token.start_char == offset[0]
              assert token.end_char == offset[1]
  
file_path: stanza/stanza/tests/tokenization/test_tokenize_utils.py
imports: import pytest
  import stanza
  from stanza import Pipeline
  from stanza.tests import *
  from stanza.models.common import doc
  from stanza.models.tokenization import data
  from stanza.models.tokenization import utils
label_desc: Use image node_id 2 for calling a global function with example usage: check_offsets(doc, expected_offsets) without return types