class_docstr: The base class for Transformer models.
class_docstr_tok: ["The","base","class","for","Transformer","models","."]
code: def _convert_text_to_input(
      self,
      tokenizer,
      texts: List[str],
      max_seq_len: int,
      split_char: str,
  ):
      pad_to_max_seq_len = False if self.task is None else True
      if self.task == "token-cls":  # Extra processing of token-cls task
          tokens = texts[0].split(split_char)
          texts[0], _ = reseg_token_label(
              tokenizer=tokenizer, tokens=tokens
          )
          is_split_into_words = True
      else:
          is_split_into_words = False
  
      encoded_inputs = []
      if self.task == "text-matching":
          if len(texts) != 2:
              raise RuntimeError(
                  "The input texts must have two sequences, but got %d. Please check your inputs."
                  % len(texts)
              )
          encoded_inputs.append(
              tokenizer(
                  text=texts[0],
                  text_pair=None,
                  max_seq_len=max_seq_len,
                  pad_to_max_seq_len=True,
                  is_split_into_words=is_split_into_words,
                  return_length=True,
              )
          )
          encoded_inputs.append(
              tokenizer(
                  text=texts[1],
                  text_pair=None,
                  max_seq_len=max_seq_len,
                  pad_to_max_seq_len=True,
                  is_split_into_words=is_split_into_words,
                  return_length=True,
              )
          )
      else:
          if len(texts) == 1:
              if Version(paddlenlp.__version__) <= Version("2.0.0rc2"):
                  encoded_inputs.append(
                      tokenizer.encode(
                          texts[0],
                          text_pair=None,
                          max_seq_len=max_seq_len,
                          pad_to_max_seq_len=pad_to_max_seq_len,
                      )
                  )
              else:
                  encoded_inputs.append(
                      tokenizer(
                          text=texts[0],
                          max_seq_len=max_seq_len,
                          pad_to_max_seq_len=True,
                          is_split_into_words=is_split_into_words,
                          return_length=True,
                      )
                  )
          elif len(texts) == 2:
              if Version(paddlenlp.__version__) <= Version("2.0.0rc2"):
                  encoded_inputs.append(
                      tokenizer.encode(
                          texts[0],
                          text_pair=texts[1],
                          max_seq_len=max_seq_len,
                          pad_to_max_seq_len=pad_to_max_seq_len,
                      )
                  )
              else:
                  encoded_inputs.append(
                      tokenizer(
                          text=texts[0],
                          text_pair=texts[1],
                          max_seq_len=max_seq_len,
                          pad_to_max_seq_len=True,
                          is_split_into_words=is_split_into_words,
                          return_length=True,
                      )
                  )
          else:
              raise RuntimeError(
                  "The input text must have one or two sequence, but got %d. Please check your inputs."
                  % len(texts)
              )
      return encoded_inputs
  
imports: import copy
  import functools
  import inspect
  import io
  import json
  import os
  import six
  from typing import List, Tuple, Union
  import paddle
  import paddle.nn
  from packaging.version import Version
  from paddle.dataset.common import DATA_HOME
  from paddle.utils.download import get_path_from_url
  from paddlehub.module.module import serving, RunModule, runnable
  from paddlehub.utils.log import logger
  from paddlehub.utils.utils import reseg_token_label
  import paddlenlp
  from paddlenlp.embeddings.token_embedding import EMBEDDING_HOME, EMBEDDING_URL_ROOT
  from paddlenlp.data import JiebaTokenizer
  from paddlehub.compat.module.nlp_module import DataFormatError
label_desc: Use image node_id 2 for calling the TransformerModule obj's underlying member method code with example usage: obj._convert_text_to_input(tokenizer, texts, max_seq_len, split_char) and returns: encoded_inputs