code: def check_cutoffs_and_n_token(
      self,
      copied_cutoffs,
      layer,
      model_embed,
      model,
      model_class,
      resized_value,
      vocab_size,
  ):
      # Check that the cutoffs were modified accordingly
      for i in range(len(copied_cutoffs)):
          if i < layer:
              self.assertEqual(
                  model_embed.cutoffs[i], copied_cutoffs[i]
              )
              if model_class == TransfoXLLMHeadModel:
                  self.assertEqual(
                      model.crit.cutoffs[i], copied_cutoffs[i]
                  )
              if i < len(model.config.cutoffs):
                  self.assertEqual(
                      model.config.cutoffs[i], copied_cutoffs[i]
                  )
          else:
              self.assertEqual(
                  model_embed.cutoffs[i],
                  copied_cutoffs[i] + resized_value,
              )
              if model_class == TransfoXLLMHeadModel:
                  self.assertEqual(
                      model.crit.cutoffs[i],
                      copied_cutoffs[i] + resized_value,
                  )
              if i < len(model.config.cutoffs):
                  self.assertEqual(
                      model.config.cutoffs[i],
                      copied_cutoffs[i] + resized_value,
                  )
  
      self.assertEqual(model_embed.n_token, vocab_size + resized_value)
      if model_class == TransfoXLLMHeadModel:
          self.assertEqual(
              model.crit.n_token, vocab_size + resized_value
          )
  
imports: import copy
  import random
  import unittest
  from transformers import TransfoXLConfig, is_torch_available
  from transformers.testing_utils import require_torch, require_torch_multi_gpu, slow, torch_device
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
label_desc: Use image node_id 1 for calling the TransfoXLModelTest obj's underlying member method code with example usage: obj.check_cutoffs_and_n_token(copied_cutoffs, layer, model_embed, model, model_class, resized_value, vocab_size) without return types