class_docstr: `FeatureConnector` for translations with variable languages per example.
  
  Input: The TranslationVariableLanguages feature accepts a dictionary for each
    example mapping string language codes to one or more string translations.
    The languages present may vary from example to example.
  
  Output:
    language: variable-length 1D tf.Tensor of np.str_ language codes, sorted
      in ascending order.
    translation: variable-length 1D tf.Tensor of np.str_ plain text
      translations, sorted to align with language codes.
  
  Example (fixed language list):
  At construction time:
  
  ```
  tfds.features.Translation(languages=['en', 'fr', 'de'])
  ```
  
  During data generation:
  
  ```
  yield {
      'en': 'the cat',
      'fr': ['le chat', 'la chatte,']
      'de': 'die katze'
  }
  ```
  
  Tensor returned by `.as_dataset()`:
  
  ```
  {
      'language': tf.Tensor(
          shape=(4,), dtype=np.str_, numpy=array(['en', 'de', 'fr', 'fr']),
      'translation': tf.Tensor(
          shape=(4,), dtype=np.str_,
          numpy=array(['the cat', 'die katze', 'la chatte', 'le chat'])),
  }
  ```
docstr: Constructs a Translation FeatureConnector.
  
  Args:
    languages: `list<string>` (optional), full list of language codes if known
      in advance.
    doc: Documentation of this feature (e.g. description).
docstr_tok: ["Constructs","a","Translation","FeatureConnector",".","Args",":","languages",":","`","list","<","string",">","`","(","optional",")",",","full","list","of","language","codes","if","known","in","advance",".","doc",":","Documentation","of","this","feature","(","e.g",".","description",")","."]
code: def __init__(
      self,
      languages=None,
      *,
      doc: feature_lib.DocArg = None,
  ):
      """Constructs a Translation FeatureConnector.
  
      Args:
        languages: `list<string>` (optional), full list of language codes if known
          in advance.
        doc: Documentation of this feature (e.g. description).
      """
      # TODO(adarob): Add optional text encoders once `Sequence` adds support
      # for FixedVarLenFeatures.
  
      self._languages = set(languages) if languages else None
      super(TranslationVariableLanguages, self).__init__(
          feature={
              "language": text_feature.Text(),
              "translation": text_feature.Text(),
          },
          doc=doc,
      )
  
imports: from __future__ import annotations
  import collections.abc
  from typing import Union
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.features import features_dict
  from tensorflow_datasets.core.features import sequence_feature
  from tensorflow_datasets.core.features import text_feature
  from tensorflow_datasets.core.proto import feature_pb2
  from tensorflow_datasets.core.utils import type_utils
label_desc: Use image node_id 1 to create a new TranslationVariableLanguages object from inherited base classes: sequence_feature with example: obj = TranslationVariableLanguages(languages)