code: def test_graph_mode(self):
      for tf_tokenizer in self.tf_tokenizers:
          compiled_tokenizer = tf.function(tf_tokenizer)
          for test_inputs in self.test_sentences:
              test_inputs = tf.constant(test_inputs)
              compiled_outputs = compiled_tokenizer(test_inputs)
              eager_outputs = tf_tokenizer(test_inputs)
  
              for key in eager_outputs.keys():
                  self.assertTrue(
                      tf.reduce_all(
                          eager_outputs[key] == compiled_outputs[key]
                      )
                  )
  
file_path: transformers/tests/models/gpt2/test_tokenization_gpt2_tf.py
imports: import unittest
  from pathlib import Path
  from tempfile import TemporaryDirectory
  from transformers import AutoConfig, TFGPT2LMHeadModel, is_keras_nlp_available, is_tf_available
  from transformers.models.gpt2.tokenization_gpt2 import GPT2Tokenizer
  from transformers.testing_utils import require_keras_nlp, require_tf, slow
label_desc: Use image node_id 3 for calling the GPTTokenizationTest obj's underlying member method code with example usage: obj.test_graph_mode() without return types