code: def prepare_xlm_input(args, model, tokenizer, prompt_text):
      # kwargs = {"language": None, "mask_token_id": None}
  
      # Set the language
      use_lang_emb = (
          hasattr(model.config, "use_lang_emb")
          and model.config.use_lang_emb
      )
      if hasattr(model.config, "lang2id") and use_lang_emb:
          available_languages = model.config.lang2id.keys()
          if args.xlm_language in available_languages:
              language = args.xlm_language
          else:
              language = None
              while language not in available_languages:
                  language = input(
                      "Using XLM. Select language in "
                      + str(list(available_languages))
                      + " >>> "
                  )
  
          model.config.lang_id = model.config.lang2id[language]
          # kwargs["language"] = tokenizer.lang2id[language]
  
      # TODO fix mask_token_id setup when configurations will be synchronized between models and tokenizers
      # XLM masked-language modeling (MLM) models need masked token
      # is_xlm_mlm = "mlm" in args.model_name_or_path
      # if is_xlm_mlm:
      #     kwargs["mask_token_id"] = tokenizer.mask_token_id
  
      return prompt_text
  
file_path: adapters/examples/pytorch/text-generation/run_generation.py
imports: import argparse
  import logging
  import numpy
  import torch
  import adapters
  from transformers import CTRLLMHeadModel, CTRLTokenizer, GPT2LMHeadModel, GPT2Tokenizer, OpenAIGPTLMHeadModel, OpenAIGPTTokenizer, TransfoXLLMHeadModel, TransfoXLTokenizer, XLMTokenizer, XLMWithLMHeadModel, XLNetLMHeadModel, XLNetTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: prepare_xlm_input(args, model, tokenizer, prompt_text) and returns: prompt_text