code: 
  
  """simple docstring"""
  
  
  
  
  import argparse
  
  import torch
  
  from transformers import RoFormerConfig, RoFormerForMaskedLM, load_tf_weights_in_roformer
  from transformers.utils import logging
  
  
  logging.set_verbosity_info()
  def      __SCREAMING_SNAKE_CASE		(		lowercase__    ,							lowercase__    ,							lowercase__   ):
  					"""simple docstring"""
  					# Initialise PyTorch model
  					A    =      RoFormerConfig.from_json_file(lowercase__   )
  					print(F"""Building PyTorch model from configuration: {config}"""   )
  					A    =      RoFormerForMaskedLM(lowercase__   )
  
  					# Load weights from tf checkpoint
  					load_tf_weights_in_roformer(lowercase__    ,							lowercase__    ,							lowercase__   )
  
  					# Save pytorch-model
  					print(F"""Save PyTorch model to {pytorch_dump_path}"""   )
  					torch.save(model.state_dict()    ,							lowercase__    ,							_use_new_zipfile_serialization=lowercase__   )
  
  
  if __name__ == "__main__":
  	__A  :					int												=	argparse.ArgumentParser()
  	# Required parameters
  	parser.add_argument(
  	    '--tf_checkpoint_path', default=None, type=str, required=True, help='Path to the TensorFlow checkpoint path.'
  	)
  	parser.add_argument(
  	    '--bert_config_file',
  	    default=None,
  	    type=str,
  	    required=True,
  	    help=(
  	        'The config json file corresponding to the pre-trained BERT model. \n'
  	        'This specifies the model architecture.'
  	    ),
  	)
  	parser.add_argument(
  	    '--pytorch_dump_path', default=None, type=str, required=True, help='Path to the output PyTorch model.'
  	)
  	__A  :					Any												=	parser.parse_args()
  	convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.bert_config_file, args.pytorch_dump_path)
  
  
  
  
  
  
style_context: 
  
  """simple docstring"""
  
  
  
  
  import os
  
  from ...utils import logging
  from .utils import DataProcessor, InputExample
  
  
  __A  :					List[Any]												=	logging.get_logger(__name__)
  
  
  
  
  
  class     __UpperCamelCase				(     _A		):
  
  
  		def __init__(self				:	Dict  ,  __SCREAMING_SNAKE_CASE				:	int  ,  __SCREAMING_SNAKE_CASE				:	Any=None):
  							A    =      language
  							A    =      train_language
  
  
  		def       SCREAMING_SNAKE_CASE__     (self				:	Tuple  ,  __SCREAMING_SNAKE_CASE				:	Tuple):
  							A    =      self.language if self.train_language is None else self.train_language
  							A    =      self._read_tsv(os.path.join(__SCREAMING_SNAKE_CASE  ,  F"""XNLI-MT-1.0/multinli/multinli.train.{lg}.tsv"""))
  							A    =      []
  							for i, line in enumerate(__SCREAMING_SNAKE_CASE):
  												if i == 0:
  																	continue
  												A    =      F"""train-{i}"""
  												A    =      line[0]
  												A    =      line[1]
  												A    =      "contradiction" if line[2] == "contradictory" else line[2]
  												if not isinstance(__SCREAMING_SNAKE_CASE  ,  __SCREAMING_SNAKE_CASE):
  																	raise ValueError(F"""Training input {text_a} is not a string""")
  												if not isinstance(__SCREAMING_SNAKE_CASE  ,  __SCREAMING_SNAKE_CASE):
  																	raise ValueError(F"""Training input {text_b} is not a string""")
  												if not isinstance(__SCREAMING_SNAKE_CASE  ,  __SCREAMING_SNAKE_CASE):
  																	raise ValueError(F"""Training label {label} is not a string""")
  												examples.append(InputExample(guid=__SCREAMING_SNAKE_CASE  ,  text_a=__SCREAMING_SNAKE_CASE  ,  text_b=__SCREAMING_SNAKE_CASE  ,  label=__SCREAMING_SNAKE_CASE))
  							return examples
  
  
  		def       SCREAMING_SNAKE_CASE__     (self				:	List[str]  ,  __SCREAMING_SNAKE_CASE				:	Tuple):
  							A    =      self._read_tsv(os.path.join(__SCREAMING_SNAKE_CASE  ,  "XNLI-1.0/xnli.test.tsv"))
  							A    =      []
  							for i, line in enumerate(__SCREAMING_SNAKE_CASE):
  												if i == 0:
  																	continue
  												A    =      line[0]
  												if language != self.language:
  																	continue
  												A    =      F"""test-{i}"""
  												A    =      line[6]
  												A    =      line[7]
  												A    =      line[1]
  												if not isinstance(__SCREAMING_SNAKE_CASE  ,  __SCREAMING_SNAKE_CASE):
  																	raise ValueError(F"""Training input {text_a} is not a string""")
  												if not isinstance(__SCREAMING_SNAKE_CASE  ,  __SCREAMING_SNAKE_CASE):
  																	raise ValueError(F"""Training input {text_b} is not a string""")
  												if not isinstance(__SCREAMING_SNAKE_CASE  ,  __SCREAMING_SNAKE_CASE):
  																	raise ValueError(F"""Training label {label} is not a string""")
  												examples.append(InputExample(guid=__SCREAMING_SNAKE_CASE  ,  text_a=__SCREAMING_SNAKE_CASE  ,  text_b=__SCREAMING_SNAKE_CASE  ,  label=__SCREAMING_SNAKE_CASE))
  							return examples
  
  
  		def       SCREAMING_SNAKE_CASE__     (self				:	str):
  							return ["contradiction", "entailment", "neutral"]
  
  __A  :					Optional[int]												=	{
      'xnli': XnliProcessor,
  }
  
  __A  :					Union[str, Any]												=	{
      'xnli': 'classification',
  }
  
  __A  :					Tuple												=	{
      'xnli': 3,
  }
  
  
  
  
  
  