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_utils.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_utils.GenerationMixin.generate",")","Usage",":","``","`","python","en_fr_translator","=","pipeline","(","``","translation_en_to_fr","''",")","en_fr_translator","(","``","How","old","are","you","?","''",")","``","`"]
code: def _sanitize_parameters(
      self, src_lang=None, tgt_lang=None, **kwargs
  ):
      (
          preprocess_params,
          forward_params,
          postprocess_params,
      ) = super()._sanitize_parameters(**kwargs)
      if src_lang is not None:
          preprocess_params["src_lang"] = src_lang
      if tgt_lang is not None:
          preprocess_params["tgt_lang"] = tgt_lang
      if src_lang is None and tgt_lang is None:
          # Backward compatibility, direct arguments use is preferred.
          task = kwargs.get("task", self.task)
          items = task.split("_")
          if task and len(items) == 4:
              # translation, XX, to YY
              preprocess_params["src_lang"] = items[1]
              preprocess_params["tgt_lang"] = items[3]
      return preprocess_params, forward_params, postprocess_params
  
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 3 for calling the TranslationPipeline obj's underlying member method code with example usage: obj._sanitize_parameters(src_lang, tgt_lang) and returns: preprocess_params,  forward_params,  postprocess_params