class_docstr: Translates from one language to another.
  
  This translation pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"translation_xx_to_yy"`.
  
  The models that this pipeline can use are models that have been fine-tuned on a translation task. See the
  up-to-date list of available models on [huggingface.co/models](https://huggingface.co/models?filter=translation).
  For a list of available parameters, see the [following
  documentation](https://huggingface.co/docs/transformers/en/main_classes/text_generation#transformers.generation.GenerationMixin.generate)
  
  Usage:
  
  ```python
  en_fr_translator = pipeline("translation_en_to_fr")
  en_fr_translator("How old are you?")
  ```
class_docstr_tok: ["Translates","from","one","language","to","another",".","This","translation","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","translation_xx_to_yy","''","`",".","The","models","that","this","pipeline","can","use","are","models","that","have","been","fine-tuned","on","a","translation","task",".","See","the","up-to-date","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=translation",")",".","For","a","list","of","available","parameters",",","see","the","[","following","documentation","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/en\/main_classes\/text_generation","#","transformers.generation.GenerationMixin.generate",")","Usage",":","``","`","python","en_fr_translator","=","pipeline","(","``","translation_en_to_fr","''",")","en_fr_translator","(","``","How","old","are","you","?","''",")","``","`"]
code: def preprocess(
      self,
      *args,
      truncation=TruncationStrategy.DO_NOT_TRUNCATE,
      src_lang=None,
      tgt_lang=None,
  ):
      if getattr(self.tokenizer, "_build_translation_inputs", None):
          return self.tokenizer._build_translation_inputs(
              *args,
              return_tensors=self.framework,
              truncation=truncation,
              src_lang=src_lang,
              tgt_lang=tgt_lang,
          )
      else:
          return super()._parse_and_tokenize(
              *args, truncation=truncation
          )
  
imports: import enum
  import warnings
  from ..tokenization_utils import TruncationStrategy
  from ..utils import add_end_docstrings, is_tf_available, is_torch_available, logging
  from .base import PIPELINE_INIT_ARGS, Pipeline
label_desc: Use image node_id 2 for calling the TranslationPipeline obj's underlying member method code with example usage: obj.preprocess() and returns: self, super