code: def test_lm_generate_xlm_mlm_en_2048(self):
      model = TFXLMWithLMHeadModel.from_pretrained("xlm-mlm-en-2048")
      input_ids = tf.convert_to_tensor(
          [[14, 447]], dtype=tf.int32
      )  # the president
      expected_output_ids = [
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
          14,
          447,
      ]  # the president the president the president the president the president the president the president the president the president the president
      # TODO(PVP): this and other input_ids I tried for generation give pretty bad results. Not sure why. Model might just not be made for auto-regressive inference
      output_ids = model.generate(input_ids, do_sample=False)
      self.assertListEqual(
          output_ids[0].numpy().tolist(), expected_output_ids
      )
  
imports: from __future__ import annotations
  import unittest
  from transformers import is_tf_available
  from transformers.testing_utils import require_tf, slow
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 1 for calling the TFXLMModelLanguageGenerationTest obj's underlying member method code with example usage: obj.test_lm_generate_xlm_mlm_en_2048() without return types