code: def test_offsets_mapping_with_different_add_prefix_space_argument(
      self,
  ):
      # Test which aims to verify that the offsets are well adapted to the argument `add_prefix_space`
      for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
          with self.subTest(
              f"{tokenizer.__class__.__name__} ({pretrained_name})"
          ):
              text_of_1_token = "hello"  # `hello` is a token in the vocabulary of `pretrained_name`
              text = f"{text_of_1_token} {text_of_1_token}"
  
              tokenizer_r = self.rust_tokenizer_class.from_pretrained(
                  pretrained_name,
                  use_fast=True,
              )
              encoding = tokenizer_r(
                  text,
                  return_offsets_mapping=True,
                  add_special_tokens=False,
              )
              self.assertEqual(
                  encoding.offset_mapping[0], (0, len(text_of_1_token))
              )
              self.assertEqual(
                  encoding.offset_mapping[1],
                  (
                      len(text_of_1_token) + 1,
                      len(text_of_1_token) + 1 + len(text_of_1_token),
                  ),
              )
  
              text = f" {text}"
  
              tokenizer_r = self.rust_tokenizer_class.from_pretrained(
                  pretrained_name,
                  use_fast=True,
              )
              encoding = tokenizer_r(
                  text,
                  return_offsets_mapping=True,
                  add_special_tokens=False,
              )
              self.assertEqual(
                  encoding.offset_mapping[0],
                  (1, 1 + len(text_of_1_token)),
              )
              self.assertEqual(
                  encoding.offset_mapping[1],
                  (
                      1 + len(text_of_1_token) + 1,
                      1
                      + len(text_of_1_token)
                      + 1
                      + len(text_of_1_token),
                  ),
              )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/models/clip/test_tokenization_clip.py
imports: import json
  import os
  import unittest
  from transformers import CLIPTokenizer, CLIPTokenizerFast
  from transformers.models.clip.tokenization_clip import VOCAB_FILES_NAMES
  from transformers.testing_utils import require_ftfy, require_tokenizers
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 7 for calling the CLIPTokenizationTest obj's underlying member method code with example usage: obj.test_offsets_mapping_with_different_add_prefix_space_argument() without return types