code: def create_and_check_xlnet_sequence_classif(
      self,
      config,
      input_ids_1,
      input_ids_2,
      input_ids_q,
      perm_mask,
      input_mask,
      target_mapping,
      segment_ids,
      lm_labels,
      sequence_labels,
      is_impossible_labels,
      token_labels,
  ):
      model = XLNetForSequenceClassification(config)
      model.to(torch_device)
      model.eval()
  
      result = model(input_ids_1)
      result = model(input_ids_1, labels=sequence_labels)
  
      self.parent.assertEqual(result.loss.shape, ())
      self.parent.assertEqual(
          result.logits.shape,
          (self.batch_size, self.type_sequence_label_size),
      )
      self.parent.assertListEqual(
          [mem.shape for mem in result.mems],
          [(self.seq_length, self.batch_size, self.hidden_size)]
          * self.num_hidden_layers,
      )
  
imports: import random
  import unittest
  from transformers import XLNetConfig, is_torch_available
  from transformers.testing_utils import require_torch, slow, torch_device
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
label_desc: Use image node_id 12 for calling the XLNetModelTester obj's underlying member method code with example usage: obj.create_and_check_xlnet_sequence_classif(config, input_ids_1, input_ids_2, input_ids_q, perm_mask, input_mask, target_mapping, segment_ids, lm_labels, sequence_labels, is_impossible_labels, token_labels) without return types