

"""simple docstring"""






import argparse
import json
from dataclasses import dataclass, field
from functools import partial
from pathlib import Path
from typing import List

import timm
import torch
import torch.nn as nn
from huggingface_hub import hf_hub_download
from torch import Tensor

from transformers import AutoImageProcessor, ResNetConfig, ResNetForImageClassification
from transformers.utils import logging


logging.set_verbosity_info()
_lowercase			:			List[str]										=						logging.get_logger()

@dataclass
class 	__SCREAMING_SNAKE_CASE     :


					'''simple docstring'''





					_a             =							4_2
					_a             =							field(default_factory=__UpperCamelCase       )
					_a             =							field(default_factory=__UpperCamelCase       )



					def 		snake_case	(	self							:  List[str],  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Tensor,  lowerCamelCase							:  Tensor					)-> Any:
								lowerCamelCase__		:		List[str]		     =len(list(m.modules()					)					) == 1 or isinstance(lowerCamelCase,  nn.Convad					) or isinstance(lowerCamelCase,  nn.BatchNormad					)
								if has_not_submodules:
											self.traced.append(lowerCamelCase					)



					def __call__(	self							:  Any,  lowerCamelCase							:  Tensor					)-> Dict:
								for m in self.module.modules():
											self.handles.append(m.register_forward_hook(self._forward_hook					)					)
								self.module(lowerCamelCase					)
								[x.remove() for x in self.handles]
								return self




					@property
					def 		snake_case	(	self							:  List[str]					)-> int:
								# check the len of the state_dict keys to see if we have learnable params
								return list(filter(lambda lowerCamelCase					: len(list(x.state_dict().keys()					)					) > 0,  self.traced					)					)





@dataclass
class 	__SCREAMING_SNAKE_CASE     :


					'''simple docstring'''





					_a             =							4_2
					_a             =							4_2
					_a             =							0
					_a             =							field(default_factory=__UpperCamelCase       )
					_a             =							field(default_factory=__UpperCamelCase       )



					def __call__(	self							:  Any,  lowerCamelCase							:  Tensor					)-> int:
								lowerCamelCase__		:		Union[str, Any]		     =Tracker(self.dest					)(lowerCamelCase					).parametrized
								lowerCamelCase__		:		List[Any]		     =Tracker(self.src					)(lowerCamelCase					).parametrized

								lowerCamelCase__		:		Any		     =list(filter(lambda lowerCamelCase					: type(lowerCamelCase					) not in self.src_skip,  lowerCamelCase					)					)
								lowerCamelCase__		:		int		     =list(filter(lambda lowerCamelCase					: type(lowerCamelCase					) not in self.dest_skip,  lowerCamelCase					)					)

								if len(lowerCamelCase					) != len(lowerCamelCase					):
											raise Exception(
											    F'''Numbers of operations are different. Source module has {len(lowerCamelCase					)} operations while'''
											    F''' destination module has {len(lowerCamelCase					)}.'''					)

								for dest_m, src_m in zip(lowerCamelCase,  lowerCamelCase					):
											dest_m.load_state_dict(src_m.state_dict()					)
											if self.verbose == 1:
														print(F'''Transfered from={src_m} to={dest_m}'''					)






def 					snake_case__       (		__lowerCamelCase    :   Dict							,		__lowerCamelCase    :   Optional[Any]							,		__lowerCamelCase    :   Optional[int]							,		__lowerCamelCase    :   Optional[Any] = True     ):
			"""simple docstring"""
			print(f'''Converting {name}...'''     )
			with torch.no_grad():
						lowerCamelCase__		:		int		     =timm.create_model(_UpperCAmelCase							,		pretrained=_UpperCAmelCase     ).eval()
						lowerCamelCase__		:		Union[str, Any]		     =ResNetForImageClassification(_UpperCAmelCase     ).eval()
						lowerCamelCase__		:		str		     =ModuleTransfer(src=_UpperCAmelCase							,		dest=_UpperCAmelCase     )
						lowerCamelCase__		:		Optional[int]		     =torch.randn((1, 3, 224, 224)     )
						module_transfer(_UpperCAmelCase     )

			assert torch.allclose(from_model(_UpperCAmelCase     )							,		our_model(_UpperCAmelCase     ).logits     ), "The model logits don't match the original one."

			lowerCamelCase__		:		Union[str, Any]		     =f'''resnet{"-".join(name.split("resnet"     )     )}'''
			print(_UpperCAmelCase     )

			if push_to_hub:
						our_model.push_to_hub(
						    repo_path_or_name=save_directory / checkpoint_name							,		commit_message='''Add model'''							,		use_temp_dir=_UpperCAmelCase							,		)

						# we can use the convnext one
						lowerCamelCase__		:		Union[str, Any]		     =AutoImageProcessor.from_pretrained('''facebook/convnext-base-224-22k-1k'''     )
						image_processor.push_to_hub(
						    repo_path_or_name=save_directory / checkpoint_name							,		commit_message='''Add image processor'''							,		use_temp_dir=_UpperCAmelCase							,		)

						print(f'''Pushed {checkpoint_name}'''     )






def 					snake_case__       (		__lowerCamelCase    :   List[str]							,		__lowerCamelCase    :   Optional[Any] = None							,		__lowerCamelCase    :   Tuple = True     ):
			"""simple docstring"""
			lowerCamelCase__		:		Dict		     ='imagenet-1k-id2label.json'
			lowerCamelCase__		:		Optional[int]		     =1000
			lowerCamelCase__		:		int		     =(1, num_labels)

			lowerCamelCase__		:		Any		     ='huggingface/label-files'
			lowerCamelCase__		:		str		     =num_labels
			lowerCamelCase__		:		Any		     =json.load(open(hf_hub_download(_UpperCAmelCase							,		_UpperCAmelCase							,		repo_type='''dataset'''     )							,		'''r'''     )     )
			lowerCamelCase__		:		Any		     ={int(_UpperCAmelCase     ): v for k, v in idalabel.items()}

			lowerCamelCase__		:		str		     =idalabel
			lowerCamelCase__		:		Any		     ={v: k for k, v in idalabel.items()}

			lowerCamelCase__		:		Tuple		     =partial(_UpperCAmelCase							,		num_labels=_UpperCAmelCase							,		idalabel=_UpperCAmelCase							,		labelaid=_UpperCAmelCase     )

			lowerCamelCase__		:		Optional[Any]		     ={
			    'resnet18': ImageNetPreTrainedConfig(
			        depths=[2, 2, 2, 2]							,		hidden_sizes=[64, 128, 256, 512]							,		layer_type='''basic'''     ),
			    'resnet26': ImageNetPreTrainedConfig(
			        depths=[2, 2, 2, 2]							,		hidden_sizes=[256, 512, 1024, 2048]							,		layer_type='''bottleneck'''     ),
			    'resnet34': ImageNetPreTrainedConfig(
			        depths=[3, 4, 6, 3]							,		hidden_sizes=[64, 128, 256, 512]							,		layer_type='''basic'''     ),
			    'resnet50': ImageNetPreTrainedConfig(
			        depths=[3, 4, 6, 3]							,		hidden_sizes=[256, 512, 1024, 2048]							,		layer_type='''bottleneck'''     ),
			    'resnet101': ImageNetPreTrainedConfig(
			        depths=[3, 4, 23, 3]							,		hidden_sizes=[256, 512, 1024, 2048]							,		layer_type='''bottleneck'''     ),
			    'resnet152': ImageNetPreTrainedConfig(
			        depths=[3, 8, 36, 3]							,		hidden_sizes=[256, 512, 1024, 2048]							,		layer_type='''bottleneck'''     ),
			}

			if model_name:
						convert_weight_and_push(_UpperCAmelCase							,		names_to_config[model_name]							,		_UpperCAmelCase							,		_UpperCAmelCase     )
			else:
						for model_name, config in names_to_config.items():
									convert_weight_and_push(_UpperCAmelCase							,		_UpperCAmelCase							,		_UpperCAmelCase							,		_UpperCAmelCase     )
			return config, expected_shape


if __name__ == "__main__":
		_lowercase			:			int										=						argparse.ArgumentParser()
		# Required parameters
		parser.add_argument(
		    "--model_name",
		    default=None,
		    type=str,
		    help=(
		        "The name of the model you wish to convert, it must be one of the supported resnet* architecture,"
		        " currently: resnet18,26,34,50,101,152. If `None`, all of them will the converted."
		    ),
		)
		parser.add_argument(
		    "--pytorch_dump_folder_path",
		    default=None,
		    type=Path,
		    required=True,
		    help="Path to the output PyTorch model directory.",
		)
		parser.add_argument(
		    "--push_to_hub",
		    default=True,
		    type=bool,
		    required=False,
		    help="If True, push model and image processor to the hub.",
		)

		_lowercase			:			str										=						parser.parse_args()
		_lowercase			:			Path										=						args.pytorch_dump_folder_path
		pytorch_dump_folder_path.mkdir(exist_ok=True, parents=True)
		convert_weights_and_push(pytorch_dump_folder_path, args.model_name, args.push_to_hub)









"""simple docstring"""






from collections import OrderedDict
from typing import Any, Mapping, Optional

from ... import PreTrainedTokenizer
from ...configuration_utils import PretrainedConfig
from ...file_utils import TensorType, is_torch_available
from ...onnx import OnnxConfig, OnnxConfigWithPast, OnnxSeqaSeqConfigWithPast
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import logging


_lowercase			:			Dict										=						logging.get_logger(__name__)

_lowercase			:			int										=						{
    "facebook/blenderbot_small-90M": "https://huggingface.co/facebook/blenderbot_small-90M/resolve/main/config.json",
    # See all BlenderbotSmall models at https://huggingface.co/models?filter=blenderbot_small
}

class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_       ):


					'''simple docstring'''





					_a             =							'blenderbot-small'
					_a             =							['past_key_values']
					_a             =							{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}



					def __init__(	self							:  Tuple,  lowerCamelCase							:  Any=5_0265,  lowerCamelCase							:  Optional[Any]=512,  lowerCamelCase							:  Union[str, Any]=8,  lowerCamelCase							:  Dict=2048,  lowerCamelCase							:  str=16,  lowerCamelCase							:  List[Any]=8,  lowerCamelCase							:  List[str]=2048,  lowerCamelCase							:  int=16,  lowerCamelCase							:  Any=0.0,  lowerCamelCase							:  Dict=0.0,  lowerCamelCase							:  Tuple=True,  lowerCamelCase							:  Tuple=True,  lowerCamelCase							:  Optional[int]="gelu",  lowerCamelCase							:  Tuple=512,  lowerCamelCase							:  Tuple=0.1,  lowerCamelCase							:  Optional[int]=0.0,  lowerCamelCase							:  Optional[int]=0.0,  lowerCamelCase							:  List[str]=0.02,  lowerCamelCase							:  Any=1,  lowerCamelCase							:  Union[str, Any]=False,  lowerCamelCase							:  Any=0,  lowerCamelCase							:  Tuple=1,  lowerCamelCase							:  Tuple=2,  lowerCamelCase							:  Dict=2,  **lowerCamelCase							:  Any,  )-> Dict:
								lowerCamelCase__		:		Dict		     =vocab_size
								lowerCamelCase__		:		Dict		     =max_position_embeddings
								lowerCamelCase__		:		Optional[Any]		     =d_model
								lowerCamelCase__		:		Union[str, Any]		     =encoder_ffn_dim
								lowerCamelCase__		:		Optional[Any]		     =encoder_layers
								lowerCamelCase__		:		Any		     =encoder_attention_heads
								lowerCamelCase__		:		Union[str, Any]		     =decoder_ffn_dim
								lowerCamelCase__		:		Optional[int]		     =decoder_layers
								lowerCamelCase__		:		Any		     =decoder_attention_heads
								lowerCamelCase__		:		Optional[int]		     =dropout
								lowerCamelCase__		:		str		     =attention_dropout
								lowerCamelCase__		:		Union[str, Any]		     =activation_dropout
								lowerCamelCase__		:		Tuple		     =activation_function
								lowerCamelCase__		:		str		     =init_std
								lowerCamelCase__		:		List[Any]		     =encoder_layerdrop
								lowerCamelCase__		:		List[str]		     =decoder_layerdrop
								lowerCamelCase__		:		Tuple		     =use_cache
								lowerCamelCase__		:		Optional[Any]		     =encoder_layers
								lowerCamelCase__		:		List[Any]		     =scale_embedding  # scale factor will be sqrt(d_model) if True

								super().__init__(
								    pad_token_id=lowerCamelCase,  bos_token_id=lowerCamelCase,  eos_token_id=lowerCamelCase,  is_encoder_decoder=lowerCamelCase,  decoder_start_token_id=lowerCamelCase,  forced_eos_token_id=lowerCamelCase,  **lowerCamelCase,  )





class 	__SCREAMING_SNAKE_CASE     (				lowerCAmelCase_       ):


					'''simple docstring'''





					@property
					def 		snake_case	(	self							:  Optional[int]					)-> Mapping[str, Mapping[int, str]]:
								if self.task in ["default", "seq2seq-lm"]:
											lowerCamelCase__		:		int		     =OrderedDict(
											    [
											        ('''input_ids''', {0: '''batch''', 1: '''encoder_sequence'''}),
											        ('''attention_mask''', {0: '''batch''', 1: '''encoder_sequence'''}),
											    ]					)

											if self.use_past:
														lowerCamelCase__		:		List[str]		     ={0: '''batch'''}
														lowerCamelCase__		:		Tuple		     ={0: '''batch''', 1: '''past_decoder_sequence + sequence'''}
											else:
														lowerCamelCase__		:		Union[str, Any]		     ={0: '''batch''', 1: '''decoder_sequence'''}
														lowerCamelCase__		:		Tuple		     ={0: '''batch''', 1: '''decoder_sequence'''}

											if self.use_past:
														self.fill_with_past_key_values_(lowerCamelCase,  direction='''inputs'''					)
								elif self.task == "causal-lm":
											# TODO: figure this case out.
											lowerCamelCase__		:		Optional[Any]		     =OrderedDict(
											    [
											        ('''input_ids''', {0: '''batch''', 1: '''encoder_sequence'''}),
											        ('''attention_mask''', {0: '''batch''', 1: '''encoder_sequence'''}),
											    ]					)
											if self.use_past:
														lowerCamelCase__     ,       lowerCamelCase__		:		List[str]		     =self.num_layers
														for i in range(lowerCamelCase					):
																	lowerCamelCase__		:		Optional[Any]		     ={0: '''batch''', 2: '''past_sequence + sequence'''}
																	lowerCamelCase__		:		Optional[int]		     ={0: '''batch''', 2: '''past_sequence + sequence'''}
								else:
											lowerCamelCase__		:		str		     =OrderedDict(
											    [
											        ('''input_ids''', {0: '''batch''', 1: '''encoder_sequence'''}),
											        ('''attention_mask''', {0: '''batch''', 1: '''encoder_sequence'''}),
											        ('''decoder_input_ids''', {0: '''batch''', 1: '''decoder_sequence'''}),
											        ('''decoder_attention_mask''', {0: '''batch''', 1: '''decoder_sequence'''}),
											    ]					)

								return common_inputs



					@property
					def 		snake_case	(	self							:  Dict					)-> Mapping[str, Mapping[int, str]]:
								if self.task in ["default", "seq2seq-lm"]:
											lowerCamelCase__		:		Dict		     =super().outputs
								else:
											lowerCamelCase__		:		Optional[Any]		     =super(lowerCamelCase,  self					).outputs
											if self.use_past:
														lowerCamelCase__     ,       lowerCamelCase__		:		str		     =self.num_layers
														for i in range(lowerCamelCase					):
																	lowerCamelCase__		:		Tuple		     ={0: '''batch''', 2: '''past_sequence + sequence'''}
																	lowerCamelCase__		:		Dict		     ={0: '''batch''', 2: '''past_sequence + sequence'''}
								return common_outputs



					def 		snake_case	(	self							:  List[str],  lowerCamelCase							:  PreTrainedTokenizer,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  bool = False,  lowerCamelCase							:  Optional[TensorType] = None,  )-> Mapping[str, Any]:
								lowerCamelCase__		:		Any		     =self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
								    lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase					)

								# Generate decoder inputs
								lowerCamelCase__		:		str		     =seq_length if not self.use_past else 1
								lowerCamelCase__		:		Tuple		     =self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
								    lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase					)
								lowerCamelCase__		:		str		     ={F'''decoder_{name}''': tensor for name, tensor in decoder_inputs.items()}
								lowerCamelCase__		:		Tuple		     =dict(**lowerCamelCase,  **lowerCamelCase					)

								if self.use_past:
											if not is_torch_available():
														raise ValueError('''Cannot generate dummy past_keys inputs without PyTorch installed.'''					)
											else:
														import torch
											lowerCamelCase__     ,       lowerCamelCase__		:		List[Any]		     =common_inputs['''input_ids'''].shape
											lowerCamelCase__		:		Optional[Any]		     =common_inputs['''decoder_input_ids'''].shape[1]
											lowerCamelCase__     ,       lowerCamelCase__		:		List[str]		     =self.num_attention_heads
											lowerCamelCase__		:		str		     =(
											    batch,
											    num_encoder_attention_heads,
											    encoder_seq_length,
											    self._config.hidden_size // num_encoder_attention_heads,
											)
											lowerCamelCase__		:		List[Any]		     =decoder_seq_length + 3
											lowerCamelCase__		:		Optional[int]		     =(
											    batch,
											    num_decoder_attention_heads,
											    decoder_past_length,
											    self._config.hidden_size // num_decoder_attention_heads,
											)

											lowerCamelCase__		:		Optional[Any]		     =torch.cat(
											    [common_inputs['''decoder_attention_mask'''], torch.ones(lowerCamelCase,  lowerCamelCase					)],  dim=1					)

											lowerCamelCase__		:		Tuple		     =[]
											# If the number of encoder and decoder layers are present in the model configuration, both are considered
											lowerCamelCase__     ,       lowerCamelCase__		:		int		     =self.num_layers
											lowerCamelCase__		:		Any		     =min(lowerCamelCase,  lowerCamelCase					)
											lowerCamelCase__		:		Any		     =max(lowerCamelCase,  lowerCamelCase					) - min_num_layers
											lowerCamelCase__		:		Dict		     ='''encoder''' if num_encoder_layers > num_decoder_layers else '''decoder'''

											for _ in range(lowerCamelCase					):
														common_inputs["past_key_values"].append(
														    (
														        torch.zeros(lowerCamelCase					),
														        torch.zeros(lowerCamelCase					),
														        torch.zeros(lowerCamelCase					),
														        torch.zeros(lowerCamelCase					),
														    )					)
											# TODO: test this.
											lowerCamelCase__		:		Union[str, Any]		     =encoder_shape if remaining_side_name == '''encoder''' else decoder_shape
											for _ in range(lowerCamelCase,  lowerCamelCase					):
														common_inputs["past_key_values"].append((torch.zeros(lowerCamelCase					), torch.zeros(lowerCamelCase					))					)
								return common_inputs



					def 		snake_case	(	self							:  List[str],  lowerCamelCase							:  PreTrainedTokenizer,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  bool = False,  lowerCamelCase							:  Optional[TensorType] = None,  )-> Mapping[str, Any]:
								lowerCamelCase__		:		int		     =self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
								    lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase					)

								if self.use_past:
											if not is_torch_available():
														raise ValueError('''Cannot generate dummy past_keys inputs without PyTorch installed.'''					)
											else:
														import torch
											lowerCamelCase__     ,       lowerCamelCase__		:		List[str]		     =common_inputs['''input_ids'''].shape
											# Not using the same length for past_key_values
											lowerCamelCase__		:		Union[str, Any]		     =seqlen + 2
											lowerCamelCase__     ,       lowerCamelCase__		:		int		     =self.num_layers
											lowerCamelCase__     ,       lowerCamelCase__		:		Optional[int]		     =self.num_attention_heads
											lowerCamelCase__		:		int		     =(
											    batch,
											    num_encoder_attention_heads,
											    past_key_values_length,
											    self._config.hidden_size // num_encoder_attention_heads,
											)

											lowerCamelCase__		:		str		     =common_inputs['''attention_mask'''].dtype
											lowerCamelCase__		:		int		     =torch.cat(
											    [common_inputs['''attention_mask'''], torch.ones(lowerCamelCase,  lowerCamelCase,  dtype=lowerCamelCase					)],  dim=1					)
											lowerCamelCase__		:		str		     =[
											    (torch.zeros(lowerCamelCase					), torch.zeros(lowerCamelCase					)) for _ in range(lowerCamelCase					)
											]
								return common_inputs



					def 		snake_case	(	self							:  Optional[int],  lowerCamelCase							:  PreTrainedTokenizer,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  bool = False,  lowerCamelCase							:  Optional[TensorType] = None,  )-> Mapping[str, Any]:
								# Copied from OnnxConfig.generate_dummy_inputs
								# Did not use super(OnnxConfigWithPast, self).generate_dummy_inputs for code clarity.
								# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
								lowerCamelCase__		:		int		     =compute_effective_axis_dimension(
								    lowerCamelCase,  fixed_dimension=OnnxConfig.default_fixed_batch,  num_token_to_add=0					)

								# If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
								lowerCamelCase__		:		Optional[int]		     =tokenizer.num_special_tokens_to_add(lowerCamelCase					)
								lowerCamelCase__		:		Optional[int]		     =compute_effective_axis_dimension(
								    lowerCamelCase,  fixed_dimension=OnnxConfig.default_fixed_sequence,  num_token_to_add=lowerCamelCase					)

								# Generate dummy inputs according to compute batch and sequence
								lowerCamelCase__		:		Optional[int]		     =[''' '''.join([tokenizer.unk_token]					) * seq_length] * batch_size
								lowerCamelCase__		:		Optional[Any]		     =dict(tokenizer(lowerCamelCase,  return_tensors=lowerCamelCase					)					)
								return common_inputs



					def 		snake_case	(	self							:  List[Any],  lowerCamelCase							:  PreTrainedTokenizer,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  int = -1,  lowerCamelCase							:  bool = False,  lowerCamelCase							:  Optional[TensorType] = None,  )-> Mapping[str, Any]:
								if self.task in ["default", "seq2seq-lm"]:
											lowerCamelCase__		:		Union[str, Any]		     =self._generate_dummy_inputs_for_default_and_seqaseq_lm(
											    lowerCamelCase,  batch_size=lowerCamelCase,  seq_length=lowerCamelCase,  is_pair=lowerCamelCase,  framework=lowerCamelCase					)

								elif self.task == "causal-lm":
											lowerCamelCase__		:		Union[str, Any]		     =self._generate_dummy_inputs_for_causal_lm(
											    lowerCamelCase,  batch_size=lowerCamelCase,  seq_length=lowerCamelCase,  is_pair=lowerCamelCase,  framework=lowerCamelCase					)
								else:
											lowerCamelCase__		:		List[Any]		     =self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
											    lowerCamelCase,  batch_size=lowerCamelCase,  seq_length=lowerCamelCase,  is_pair=lowerCamelCase,  framework=lowerCamelCase					)

								return common_inputs




					def 		snake_case	(	self							:  Optional[Any],  lowerCamelCase							:  Tuple,  lowerCamelCase							:  Union[str, Any],  lowerCamelCase							:  Dict,  lowerCamelCase							:  Any					)-> str:
								if self.task in ["default", "seq2seq-lm"]:
											lowerCamelCase__		:		Any		     =super()._flatten_past_key_values_(lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase					)
								else:
											lowerCamelCase__		:		List[str]		     =super(lowerCamelCase,  self					)._flatten_past_key_values_(
											    lowerCamelCase,  lowerCamelCase,  lowerCamelCase,  lowerCamelCase					)




