'''simple docstring'''


import argparse
import os
import pickle
import sys

import torch

from transformers import TransfoXLConfig, TransfoXLLMHeadModel, load_tf_weights_in_transfo_xl
from transformers.models.transfo_xl import tokenization_transfo_xl as data_utils
from transformers.models.transfo_xl.tokenization_transfo_xl import CORPUS_NAME, VOCAB_FILES_NAMES
from transformers.utils import CONFIG_NAME, WEIGHTS_NAME, logging


logging.set_verbosity_info()

# We do this to be able to load python 2 datasets pickles
# See e.g. https://stackoverflow.com/questions/2121874/python-pickling-after-changing-a-modules-directory/2121918#2121918
__lowerCAmelCase	:       Optional[int]						       =	data_utils.TransfoXLTokenizer
__lowerCAmelCase	:       Any						       =	data_utils.TransfoXLCorpus
__lowerCAmelCase	:       Tuple						       =	data_utils
__lowerCAmelCase	:       List[str]						       =	data_utils





def       lowerCAmelCase					(		UpperCamelCase__				:   Optional[Any]    ,					UpperCamelCase__				:   str    ,					UpperCamelCase__				:   Dict    ,					UpperCamelCase__				:   Union[str, Any]       ):


	"""simple docstring"""
	if transfo_xl_dataset_file:
		# Convert a pre-processed corpus (see original TensorFlow repo)
		with open(UpperCamelCase__    ,					'''rb'''       ) as fp:
			__UpperCAmelCase							=			pickle.load(UpperCamelCase__    ,					encoding='''latin1'''       )
		# Save vocabulary and dataset cache as Dictionaries (should be better than pickles for the long-term)
		__UpperCAmelCase							=			pytorch_dump_folder_path + '''/''' + VOCAB_FILES_NAMES['''pretrained_vocab_file''']
		print(f"""Save vocabulary to {pytorch_vocab_dump_path}"""       )
		__UpperCAmelCase							=			corpus.vocab.__dict__
		torch.save(UpperCamelCase__    ,					UpperCamelCase__       )

		__UpperCAmelCase							=			corpus.__dict__
		corpus_dict_no_vocab.pop('''vocab'''    ,					UpperCamelCase__       )
		__UpperCAmelCase							=			pytorch_dump_folder_path + '''/''' + CORPUS_NAME
		print(f"""Save dataset to {pytorch_dataset_dump_path}"""       )
		torch.save(UpperCamelCase__    ,					UpperCamelCase__       )

	if tf_checkpoint_path:
		# Convert a pre-trained TensorFlow model
		__UpperCAmelCase							=			os.path.abspath(UpperCamelCase__       )
		__UpperCAmelCase							=			os.path.abspath(UpperCamelCase__       )

		print(f"""Converting Transformer XL checkpoint from {tf_path} with config at {config_path}."""       )
		# Initialise PyTorch model
		if transfo_xl_config_file == "":
			__UpperCAmelCase							=			TransfoXLConfig()
		else:
			__UpperCAmelCase							=			TransfoXLConfig.from_json_file(UpperCamelCase__       )
		print(f"""Building PyTorch model from configuration: {config}"""       )
		__UpperCAmelCase							=			TransfoXLLMHeadModel(UpperCamelCase__       )

		__UpperCAmelCase							=			load_tf_weights_in_transfo_xl(UpperCamelCase__    ,					UpperCamelCase__    ,					UpperCamelCase__       )
		# Save pytorch-model
		__UpperCAmelCase							=			os.path.join(UpperCamelCase__    ,					UpperCamelCase__       )
		__UpperCAmelCase							=			os.path.join(UpperCamelCase__    ,					UpperCamelCase__       )
		print(f"""Save PyTorch model to {os.path.abspath(UpperCamelCase__       )}"""       )
		torch.save(model.state_dict()    ,					UpperCamelCase__       )
		print(f"""Save configuration file to {os.path.abspath(UpperCamelCase__       )}"""       )
		with open(UpperCamelCase__    ,					'''w'''    ,					encoding='''utf-8'''       ) as f:
			f.write(config.to_json_string()       )


if __name__ == "__main__":
					__lowerCAmelCase	:       int						       =	argparse.ArgumentParser()
					parser.add_argument(
					    "--pytorch_dump_folder_path",
					    default=None,
					    type=str,
					    required=True,
					    help="Path to the folder to store the PyTorch model or dataset/vocab.",
					)
					parser.add_argument(
					    "--tf_checkpoint_path",
					    default="",
					    type=str,
					    help="An optional path to a TensorFlow checkpoint path to be converted.",
					)
					parser.add_argument(
					    "--transfo_xl_config_file",
					    default="",
					    type=str,
					    help=(
					        "An optional config json file corresponding to the pre-trained BERT model. \n"
					        "This specifies the model architecture."
					    ),
					)
					parser.add_argument(
					    "--transfo_xl_dataset_file",
					    default="",
					    type=str,
					    help="An optional dataset file to be converted in a vocabulary.",
					)
					__lowerCAmelCase	:       Dict						       =	parser.parse_args()
					convert_transfo_xl_checkpoint_to_pytorch(
					    args.tf_checkpoint_path,
					    args.transfo_xl_config_file,
					    args.pytorch_dump_folder_path,
					    args.transfo_xl_dataset_file,
					)

'''simple docstring'''


from ..utils import DummyObject, requires_backends






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							List[str]     ,		**__a				:							Union[str, Any]	)							->	Union[str, Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							List[str]     ,		**__a				:							int	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							int     ,		**__a				:							List[Any]	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							int     ,		*__a				:							Optional[Any]     ,		**__a				:							Tuple	)							->	Dict:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							Tuple     ,		**__a				:							Optional[Any]	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							str     ,		**__a				:							Tuple	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							List[str]     ,		**__a				:							int	)							->	Optional[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							List[str]     ,		**__a				:							Optional[int]	)							->	List[Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							str     ,		**__a				:							Any	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							List[str]     ,		*__a				:							Dict     ,		**__a				:							List[str]	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							Any     ,		**__a				:							List[Any]	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							List[str]     ,		**__a				:							Union[str, Any]	)							->	List[str]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							str     ,		*__a				:							Optional[int]     ,		**__a				:							Optional[int]	)							->	Any:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							Dict     ,		**__a				:							List[Any]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							List[str]     ,		**__a				:							List[str]	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							Optional[Any]     ,		**__a				:							int	)							->	Union[str, Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							Optional[int]     ,		**__a				:							Dict	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Tuple     ,		**__a				:							Any	)							->	List[str]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[Any]     ,		*__a				:							Optional[Any]     ,		**__a				:							int	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Tuple     ,		**__a				:							Optional[int]	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							str     ,		**__a				:							List[Any]	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							List[Any]     ,		**__a				:							int	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							int     ,		**__a				:							str	)							->	List[Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							List[Any]     ,		**__a				:							Any	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Tuple     ,		*__a				:							str     ,		**__a				:							Tuple	)							->	Dict:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							List[str]     ,		**__a				:							Optional[Any]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Optional[int]     ,		**__a				:							Union[str, Any]	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							Union[str, Any]     ,		**__a				:							List[str]	)							->	str:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							Dict     ,		**__a				:							Union[str, Any]	)							->	List[Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							Union[str, Any]     ,		**__a				:							Any	)							->	List[str]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							str     ,		*__a				:							int     ,		**__a				:							int	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Optional[int]     ,		**__a				:							int	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							Tuple     ,		**__a				:							str	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)





def       lowerCAmelCase					(		*UpperCamelCase__				:   int    ,					**UpperCamelCase__				:   Optional[int]       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )





def       lowerCAmelCase					(		*UpperCamelCase__				:   Optional[int]    ,					**UpperCamelCase__				:   List[Any]       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )





def       lowerCAmelCase					(		*UpperCamelCase__				:   Any    ,					**UpperCamelCase__				:   List[str]       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )





def       lowerCAmelCase					(		*UpperCamelCase__				:   str    ,					**UpperCamelCase__				:   str       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )





def       lowerCAmelCase					(		*UpperCamelCase__				:   Dict    ,					**UpperCamelCase__				:   Dict       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )





def       lowerCAmelCase					(		*UpperCamelCase__				:   Tuple    ,					**UpperCamelCase__				:   int       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )





def       lowerCAmelCase					(		*UpperCamelCase__				:   Union[str, Any]    ,					**UpperCamelCase__				:   Tuple       ):


	"""simple docstring"""
	requires_backends(UpperCamelCase__    ,					['''torch''']       )






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Union[str, Any]     ,		*__a				:							str     ,		**__a				:							List[Any]	)							->	Any:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							int     ,		**__a				:							int	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							Dict     ,		**__a				:							List[str]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[Any]     ,		*__a				:							str     ,		**__a				:							List[str]	)							->	Optional[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							Dict     ,		**__a				:							Tuple	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							List[Any]     ,		**__a				:							List[str]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[Any]     ,		*__a				:							List[Any]     ,		**__a				:							List[Any]	)							->	int:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							Tuple     ,		**__a				:							int	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Any     ,		**__a				:							int	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							Optional[Any]     ,		**__a				:							Tuple	)							->	List[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							str     ,		**__a				:							int	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Dict     ,		**__a				:							Any	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							str     ,		**__a				:							str	)							->	List[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Union[str, Any]     ,		**__a				:							str	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							int     ,		**__a				:							Tuple	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							Tuple     ,		**__a				:							str	)							->	Union[str, Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Any     ,		**__a				:							Dict	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							str     ,		**__a				:							List[str]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							int     ,		**__a				:							int	)							->	Union[str, Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							str     ,		**__a				:							List[Any]	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							int     ,		**__a				:							List[str]	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							int     ,		*__a				:							Union[str, Any]     ,		**__a				:							Optional[Any]	)							->	Any:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							List[Any]     ,		**__a				:							str	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							Optional[Any]     ,		**__a				:							Any	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							List[str]     ,		*__a				:							List[str]     ,		**__a				:							Dict	)							->	Optional[int]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Optional[int]	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							int     ,		**__a				:							Dict	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							List[str]     ,		*__a				:							List[str]     ,		**__a				:							Union[str, Any]	)							->	str:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							int     ,		**__a				:							Dict	)							->	List[Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Tuple     ,		**__a				:							List[str]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							str     ,		**__a				:							Any	)							->	int:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							Dict     ,		**__a				:							Optional[Any]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							str     ,		**__a				:							Union[str, Any]	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							Optional[Any]     ,		**__a				:							List[str]	)							->	str:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Any	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Union[str, Any]     ,		**__a				:							List[Any]	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Tuple     ,		*__a				:							Optional[int]     ,		**__a				:							List[Any]	)							->	Any:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							List[str]     ,		**__a				:							Dict	)							->	List[str]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							Optional[Any]     ,		**__a				:							List[Any]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							Any     ,		**__a				:							str	)							->	List[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							Optional[Any]     ,		**__a				:							int	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							int     ,		**__a				:							Optional[Any]	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							str     ,		*__a				:							List[str]     ,		**__a				:							Dict	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Any     ,		**__a				:							Union[str, Any]	)							->	Optional[int]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							Dict     ,		**__a				:							Union[str, Any]	)							->	List[str]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							Tuple     ,		**__a				:							Optional[int]	)							->	str:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							List[Any]     ,		**__a				:							List[str]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Union[str, Any]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							List[Any]     ,		**__a				:							int	)							->	int:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Optional[Any]     ,		**__a				:							str	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							Tuple     ,		**__a				:							int	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[Any]     ,		*__a				:							Optional[int]     ,		**__a				:							Tuple	)							->	Optional[int]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							Union[str, Any]     ,		**__a				:							List[Any]	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							List[Any]     ,		**__a				:							List[str]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							List[Any]     ,		*__a				:							Optional[int]     ,		**__a				:							int	)							->	Dict:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Union[str, Any]     ,		**__a				:							List[Any]	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							int     ,		**__a				:							Any	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							str     ,		*__a				:							Any     ,		**__a				:							int	)							->	Tuple:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							List[Any]     ,		**__a				:							Union[str, Any]	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							List[Any]     ,		**__a				:							Dict	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							List[Any]     ,		*__a				:							int     ,		**__a				:							Optional[int]	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							List[Any]     ,		**__a				:							Any	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							Tuple     ,		**__a				:							List[Any]	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							Dict     ,		**__a				:							Optional[int]	)							->	Dict:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							Any     ,		**__a				:							Dict	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							Any     ,		**__a				:							Any	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Union[str, Any]     ,		*__a				:							Tuple     ,		**__a				:							Optional[int]	)							->	Optional[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							Optional[Any]     ,		**__a				:							Optional[Any]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							List[Any]     ,		**__a				:							Dict	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							Union[str, Any]     ,		**__a				:							Optional[int]	)							->	Dict:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							Any     ,		**__a				:							Optional[int]	)							->	Optional[int]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							Union[str, Any]     ,		**__a				:							List[str]	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[Any]     ,		*__a				:							Optional[int]     ,		**__a				:							List[Any]	)							->	str:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Any     ,		*__a				:							Dict     ,		**__a				:							int	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Optional[int]     ,		**__a				:							Union[str, Any]	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							Union[str, Any]     ,		**__a				:							int	)							->	Optional[int]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							Optional[Any]     ,		**__a				:							int	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							List[Any]     ,		**__a				:							Optional[int]	)							->	Optional[int]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							Optional[Any]     ,		**__a				:							Optional[int]	)							->	Tuple:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[int]     ,		*__a				:							Optional[int]     ,		**__a				:							List[Any]	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							List[str]     ,		**__a				:							Union[str, Any]	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							str     ,		*__a				:							Tuple     ,		**__a				:							Tuple	)							->	str:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							List[str]     ,		**__a				:							Tuple	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							Dict     ,		**__a				:							Tuple	)							->	Tuple:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[Any]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Optional[int]	)							->	List[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							List[str]     ,		**__a				:							int	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							int     ,		*__a				:							Tuple     ,		**__a				:							Optional[Any]	)							->	Optional[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Union[str, Any]	)							->	Optional[int]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							Any     ,		**__a				:							List[str]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							int     ,		**__a				:							int	)							->	List[Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							Any     ,		**__a				:							List[Any]	)							->	Union[str, Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							int     ,		**__a				:							str	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							Dict     ,		**__a				:							Optional[Any]	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Union[str, Any]     ,		*__a				:							List[str]     ,		**__a				:							int	)							->	Union[str, Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							List[Any]     ,		**__a				:							Any	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							str     ,		**__a				:							Optional[Any]	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Optional[int]     ,		*__a				:							List[Any]     ,		**__a				:							List[str]	)							->	Optional[int]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							Optional[Any]     ,		**__a				:							str	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							List[Any]     ,		**__a				:							Union[str, Any]	)							->	Optional[int]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Union[str, Any]     ,		*__a				:							List[Any]     ,		**__a				:							Optional[Any]	)							->	int:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Union[str, Any]     ,		*__a				:							List[Any]     ,		**__a				:							Any	)							->	int:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Optional[Any]     ,		*__a				:							List[str]     ,		**__a				:							Any	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Any     ,		*__a				:							List[str]     ,		**__a				:							Dict	)							->	List[str]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							Dict     ,		**__a				:							Optional[Any]	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							str     ,		**__a				:							Any	)							->	Dict:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							List[str]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Optional[int]	)							->	List[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							Dict     ,		**__a				:							Tuple	)							->	Optional[int]:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							str     ,		*__a				:							Any     ,		**__a				:							Any	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							int     ,		*__a				:							Any     ,		**__a				:							Optional[Any]	)							->	int:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							Dict     ,		*__a				:							int     ,		**__a				:							List[Any]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[str]     ,		*__a				:							Dict     ,		**__a				:							Tuple	)							->	Union[str, Any]:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Tuple     ,		*__a				:							int     ,		**__a				:							Optional[Any]	)							->	List[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							Union[str, Any]     ,		**__a				:							Union[str, Any]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							Tuple     ,		*__a				:							Any     ,		**__a				:							Optional[int]	)							->	str:
								requires_backends(cls     ,		['''torch''']	)






class 						A   (   metaclass=UpperCAmelCase   ):
							a_        =      ['''torch''']





							def __init__(      self				:							Dict     ,		*__a				:							List[str]     ,		**__a				:							List[Any]	)							->	Optional[Any]:
								requires_backends(self     ,		['''torch''']	)





							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							int     ,		**__a				:							Any	)							->	Any:
								requires_backends(cls     ,		['''torch''']	)






							@classmethod
							def       snake_case__						(      cls				:							List[Any]     ,		*__a				:							List[str]     ,		**__a				:							List[str]	)							->	List[Any]:
								requires_backends(cls     ,		['''torch''']	)
