code: def check_transfo_xl_model_output(self, result):
      self.parent.assertEqual(
          result["hidden_states_1"].shape,
          (self.batch_size, self.seq_length, self.hidden_size),
      )
      self.parent.assertEqual(
          result["hidden_states_2"].shape,
          (self.batch_size, self.seq_length, self.hidden_size),
      )
      self.parent.assertListEqual(
          [mem.shape for mem in result["mems_1"]],
          [(self.mem_len, self.batch_size, self.hidden_size)]
          * self.num_hidden_layers,
      )
      self.parent.assertListEqual(
          [mem.shape for mem in result["mems_2"]],
          [(self.mem_len, self.batch_size, self.hidden_size)]
          * self.num_hidden_layers,
      )
  
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 6 for calling the TransfoXLModelTester obj's underlying member method code with example usage: obj.check_transfo_xl_model_output(result) without return types