code: 
  '''simple docstring'''
  
  import os
  
  from ...utils import logging
  from .utils import DataProcessor, InputExample
  
  
  _UpperCAmelCase   :      int 						=  logging.get_logger(__name__)
  
  class 			UpperCAmelCase				(					a_ ):
  
  
  
  
  
  		"""simple docstring"""
  
  
  
  
  
  		def __init__(    self  ,					_snake_case  ,					_snake_case=None     )				->    Optional[int]:
  				_UpperCamelCase       : Dict    =      language
  				_UpperCamelCase       : Union[str, Any]    =      train_language
  		def _lowercase  (    self  ,					_snake_case     )				->    Dict:
  				_UpperCamelCase       : str    =      self.language if self.train_language is None else self.train_language
  				_UpperCamelCase       : Union[str, Any]    =      self._read_tsv(os.path.join(_snake_case  ,					F'''XNLI-MT-1.0/multinli/multinli.train.{lg}.tsv'''     )     )
  				_UpperCamelCase       : str    =      []
  				for i, line in enumerate(_snake_case     ):
  						if i == 0:
  								continue
  						_UpperCamelCase       : Optional[Any]    =      F'''train-{i}'''
  						_UpperCamelCase       : Dict    =      line[0]
  						_UpperCamelCase       : Any    =      line[1]
  						_UpperCamelCase       : Union[str, Any]    =      '''contradiction''' if line[2] == '''contradictory''' else line[2]
  						if not isinstance(_snake_case  ,					_snake_case     ):
  								raise ValueError(F'''Training input {text_a} is not a string'''     )
  						if not isinstance(_snake_case  ,					_snake_case     ):
  								raise ValueError(F'''Training input {text_b} is not a string'''     )
  						if not isinstance(_snake_case  ,					_snake_case     ):
  								raise ValueError(F'''Training label {label} is not a string'''     )
  						examples.append(InputExample(guid=_snake_case  ,					text_a=_snake_case  ,					text_b=_snake_case  ,					label=_snake_case     )     )
  				return examples
  		def _lowercase  (    self  ,					_snake_case     )				->    Any:
  				_UpperCamelCase       : Dict    =      self._read_tsv(os.path.join(_snake_case  ,					'''XNLI-1.0/xnli.test.tsv'''     )     )
  				_UpperCamelCase       : Dict    =      []
  				for i, line in enumerate(_snake_case     ):
  						if i == 0:
  								continue
  						_UpperCamelCase       : List[Any]    =      line[0]
  						if language != self.language:
  								continue
  						_UpperCamelCase       : Optional[Any]    =      F'''test-{i}'''
  						_UpperCamelCase       : Tuple    =      line[6]
  						_UpperCamelCase       : Union[str, Any]    =      line[7]
  						_UpperCamelCase       : Dict    =      line[1]
  						if not isinstance(_snake_case  ,					_snake_case     ):
  								raise ValueError(F'''Training input {text_a} is not a string'''     )
  						if not isinstance(_snake_case  ,					_snake_case     ):
  								raise ValueError(F'''Training input {text_b} is not a string'''     )
  						if not isinstance(_snake_case  ,					_snake_case     ):
  								raise ValueError(F'''Training label {label} is not a string'''     )
  						examples.append(InputExample(guid=_snake_case  ,					text_a=_snake_case  ,					text_b=_snake_case  ,					label=_snake_case     )     )
  				return examples
  
  
  
  
  		def _lowercase  (    self     )				->    Tuple:
  				return ["contradiction", "entailment", "neutral"]
  
  
  
  
  
  
  
  _UpperCAmelCase   :      Optional[Any] 						=  {
      """xnli""": XnliProcessor,
  }
  
  _UpperCAmelCase   :      List[Any] 						=  {
      """xnli""": """classification""",
  }
  
  _UpperCAmelCase   :      Tuple 						=  {
      """xnli""": 3,
  }
  
  
  
  
  
  
style_context: 
  '''simple docstring'''
  
  import warnings
  
  from ...utils import logging
  from .image_processing_mobilenet_va import MobileNetVaImageProcessor
  
  
  _UpperCAmelCase   :      Optional[int] 						=  logging.get_logger(__name__)
  
  class 			UpperCAmelCase				(					a_ ):
  
  
  
  
  
  		"""simple docstring"""
  
  
  
  
  
  		def __init__(    self  ,					*_snake_case  ,					**_snake_case     )				->    None:
  				warnings.warn(
  				    '''The class MobileNetV2FeatureExtractor is deprecated and will be removed in version 5 of Transformers.'''
  				    ''' Please use MobileNetV2ImageProcessor instead.'''  ,					_snake_case  ,					)
  				super().__init__(*_snake_case  ,					**_snake_case     )
  
  
  
  
  
  