

'''simple docstring'''


import os
from dataclasses import dataclass, field
from io import BytesIO
from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Union

import numpy as np
import pyarrow as pa

from .. import config
from ..download.streaming_download_manager import xopen, xsplitext
from ..table import array_cast
from ..utils.py_utils import no_op_if_value_is_null, string_to_dict


if TYPE_CHECKING:
					from .features import FeatureType


lowerCAmelCase__						,			lowerCAmelCase__						,			lowerCAmelCase__						:       int										=						False, False, False




@dataclass
class     a			:






						"""simple docstring"""




						__UpperCAmelCase			     =    None
						__UpperCAmelCase			     =    True
						__UpperCAmelCase			     =    True
						__UpperCAmelCase			     =    None
						# Automatically constructed
						__UpperCAmelCase			     =    "dict"
						__UpperCAmelCase			     =    pa.struct({"""bytes""": pa.binary(), """path""": pa.string()}       )
						__UpperCAmelCase			     =    field(default="""Audio"""			,			init=SCREAMING_SNAKE_CASE			,			repr=SCREAMING_SNAKE_CASE       )







						def __call__(							self					:      Tuple  ):



								'''simple docstring'''



								return self.pa_type







						def       __magic_name__							(							self					:      int			,			snake_case_					:      Union[str, bytes, dict]  ):



								'''simple docstring'''



								try:
										import soundfile as sf  # soundfile is a dependency of librosa, needed to decode audio files.
								except ImportError as err:
										raise ImportError('''To support encoding audio data, please install \'soundfile\'.'''  ) from err
								if isinstance(snake_case_			,			snake_case_  ):
										return {"bytes": None, "path": value}
								elif isinstance(snake_case_			,			snake_case_  ):
										return {"bytes": value, "path": None}
								elif "array" in value:
										# convert the audio array to wav bytes
										snake_case__						:       Optional[int]       						=  BytesIO()
										sf.write(snake_case_			,			value['''array''']			,			value['''sampling_rate''']			,			format='''wav'''  )
										return {"bytes": buffer.getvalue(), "path": None}
								elif value.get('''path'''  ) is not None and os.path.isfile(value['''path''']  ):
										# we set "bytes": None to not duplicate the data if they're already available locally
										if value["path"].endswith('''pcm'''  ):
												# "PCM" only has raw audio bytes
												if value.get('''sampling_rate'''  ) is None:
														# At least, If you want to convert "PCM-byte" to "WAV-byte", you have to know sampling rate
														raise KeyError('''To use PCM files, please specify a \'sampling_rate\' in Audio object'''  )
												if value.get('''bytes'''  ):
														# If we already had PCM-byte, we don`t have to make "read file, make bytes" (just use it!)
														snake_case__						:       List[Any]       						=  np.frombuffer(value['''bytes''']			,			dtype=np.intaa  ).astype(np.floataa  ) / 3_2_7_6_7
												else:
														snake_case__						:       Union[str, Any]       						=  np.memmap(value['''path''']			,			dtype='''h'''			,			mode='''r'''  ).astype(np.floataa  ) / 3_2_7_6_7

												snake_case__						:       int       						=  BytesIO(bytes()  )
												sf.write(snake_case_			,			snake_case_			,			value['''sampling_rate''']			,			format='''wav'''  )
												return {"bytes": buffer.getvalue(), "path": None}
										else:
												return {"bytes": None, "path": value.get('''path'''  )}
								elif value.get('''bytes'''  ) is not None or value.get('''path'''  ) is not None:
										# store the audio bytes, and path is used to infer the audio format using the file extension
										return {"bytes": value.get('''bytes'''  ), "path": value.get('''path'''  )}
								else:
										raise ValueError(
										    F"""An audio sample should have one of 'path' or 'bytes' but they are missing or None in {value}."""  )







						def       __magic_name__							(							self					:      Optional[int]			,			snake_case_					:      dict			,			snake_case_					:      Optional[Dict[str, Union[str, bool, None]]] = None  ):



								'''simple docstring'''



								if not self.decode:
										raise RuntimeError('''Decoding is disabled for this feature. Please use Audio(decode=True) instead.'''  )

								snake_case__						,       snake_case__						:       Optional[int]       						=  (value['''path'''], BytesIO(value['''bytes''']  )) if value['''bytes'''] is not None else (value['''path'''], None)
								if path is None and file is None:
										raise ValueError(F"""An audio sample should have one of 'path' or 'bytes' but both are None in {value}."""  )

								try:
										import librosa
										import soundfile as sf
								except ImportError as err:
										raise ImportError('''To support decoding audio files, please install \'librosa\' and \'soundfile\'.'''  ) from err

								snake_case__						:       Optional[int]       						=  xsplitext(snake_case_  )[1][1:].lower() if path is not None else None
								if not config.IS_OPUS_SUPPORTED and audio_format == "opus":
										raise RuntimeError(
										    '''Decoding \'opus\' files requires system library \'libsndfile\'>=1.0.31, '''
										    '''You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '''  )
								elif not config.IS_MP3_SUPPORTED and audio_format == "mp3":
										raise RuntimeError(
										    '''Decoding \'mp3\' files requires system library \'libsndfile\'>=1.1.0, '''
										    '''You can try to update `soundfile` python library: `pip install "soundfile>=0.12.1"`. '''  )

								if file is None:
										snake_case__						:       str       						=  token_per_repo_id or {}
										snake_case__						:       Dict       						=  path.split('''::'''  )[-1]
										try:
												snake_case__						:       List[str]       						=  string_to_dict(snake_case_			,			config.HUB_DATASETS_URL  )['''repo_id''']
												snake_case__						:       List[Any]       						=  token_per_repo_id[repo_id]
										except (ValueError, KeyError):
												snake_case__						:       List[Any]       						=  None

										with xopen(snake_case_			,			'''rb'''			,			use_auth_token=snake_case_  ) as f:
												snake_case__						,       snake_case__						:       List[Any]       						=  sf.read(snake_case_  )

								else:
										snake_case__						,       snake_case__						:       Dict       						=  sf.read(snake_case_  )

								snake_case__						:       Any       						=  array.T
								if self.mono:
										snake_case__						:       List[str]       						=  librosa.to_mono(snake_case_  )
								if self.sampling_rate and self.sampling_rate != sampling_rate:
										snake_case__						:       Tuple       						=  librosa.resample(snake_case_			,			orig_sr=snake_case_			,			target_sr=self.sampling_rate  )
										snake_case__						:       Dict       						=  self.sampling_rate

								return {"path": path, "array": array, "sampling_rate": sampling_rate}







						def       __magic_name__							(							self					:      Optional[int]  ):



								'''simple docstring'''



								from .features import Value

								if self.decode:
										raise ValueError('''Cannot flatten a decoded Audio feature.'''  )
								return {
								    "bytes": Value('''binary'''  ),
								    "path": Value('''string'''  ),
								}







						def       __magic_name__							(							self					:      List[Any]			,			snake_case_					:      Union[pa.StringArray, pa.StructArray]  ):



								'''simple docstring'''



								if pa.types.is_string(storage.type  ):
										snake_case__						:       Any       						=  pa.array([None] * len(snake_case_  )			,			type=pa.binary()  )
										snake_case__						:       Optional[Any]       						=  pa.StructArray.from_arrays([bytes_array, storage]			,			['''bytes''', '''path''']			,			mask=storage.is_null()  )
								elif pa.types.is_binary(storage.type  ):
										snake_case__						:       List[str]       						=  pa.array([None] * len(snake_case_  )			,			type=pa.string()  )
										snake_case__						:       Optional[int]       						=  pa.StructArray.from_arrays([storage, path_array]			,			['''bytes''', '''path''']			,			mask=storage.is_null()  )
								elif pa.types.is_struct(storage.type  ) and storage.type.get_all_field_indices('''array'''  ):
										snake_case__						:       List[str]       						=  pa.array([Audio().encode_example(snake_case_  ) if x is not None else None for x in storage.to_pylist()]  )
								elif pa.types.is_struct(storage.type  ):
										if storage.type.get_field_index('''bytes'''  ) >= 0:
												snake_case__						:       List[Any]       						=  storage.field('''bytes'''  )
										else:
												snake_case__						:       Union[str, Any]       						=  pa.array([None] * len(snake_case_  )			,			type=pa.binary()  )
										if storage.type.get_field_index('''path'''  ) >= 0:
												snake_case__						:       Tuple       						=  storage.field('''path'''  )
										else:
												snake_case__						:       str       						=  pa.array([None] * len(snake_case_  )			,			type=pa.string()  )
										snake_case__						:       Optional[int]       						=  pa.StructArray.from_arrays([bytes_array, path_array]			,			['''bytes''', '''path''']			,			mask=storage.is_null()  )
								return array_cast(snake_case_			,			self.pa_type  )







						def       __magic_name__							(							self					:      Dict			,			snake_case_					:      pa.StructArray  ):



								'''simple docstring'''



								@no_op_if_value_is_null
								def path_to_bytes(snake_case_					:      Any  ):
										with xopen(snake_case_			,			'''rb'''  ) as f:
												snake_case__						:       int       						=  f.read()
										return bytes_

								snake_case__						:       Tuple       						=  pa.array(
								    [
								        (path_to_bytes(x['''path''']  ) if x['''bytes'''] is None else x['''bytes''']) if x is not None else None
								        for x in storage.to_pylist()
								    ]			,			type=pa.binary()			,			)
								snake_case__						:       List[Any]       						=  pa.array(
								    [os.path.basename(snake_case_  ) if path is not None else None for path in storage.field('''path'''  ).to_pylist()]			,			type=pa.string()			,			)
								snake_case__						:       Union[str, Any]       						=  pa.StructArray.from_arrays([bytes_array, path_array]			,			['''bytes''', '''path''']			,			mask=bytes_array.is_null()  )
								return array_cast(snake_case_			,			self.pa_type  )






'''simple docstring'''


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

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


lowerCAmelCase__						:       Optional[Any]										=						logging.get_logger(__name__)

lowerCAmelCase__						:       Optional[int]										=						{
    """facebook/bart-large""": """https://huggingface.co/facebook/bart-large/resolve/main/config.json""",
    # See all BART models at https://huggingface.co/models?filter=bart
}




class     a			(				SCREAMING_SNAKE_CASE       ):






						"""simple docstring"""




						__UpperCAmelCase			     =    """bart"""
						__UpperCAmelCase			     =    ["""past_key_values"""]
						__UpperCAmelCase			     =    {"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}







						def __init__(							self					:      Optional[Any]			,			snake_case_					:      Tuple=5_0_2_6_5			,			snake_case_					:      Dict=1_0_2_4			,			snake_case_					:      int=1_2			,			snake_case_					:      int=4_0_9_6			,			snake_case_					:      str=1_6			,			snake_case_					:      List[Any]=1_2			,			snake_case_					:      List[Any]=4_0_9_6			,			snake_case_					:      Any=1_6			,			snake_case_					:      str=0.0			,			snake_case_					:      Optional[int]=0.0			,			snake_case_					:      List[Any]="gelu"			,			snake_case_					:      List[Any]=1_0_2_4			,			snake_case_					:      Union[str, Any]=0.1			,			snake_case_					:      int=0.0			,			snake_case_					:      Tuple=0.0			,			snake_case_					:      Optional[Any]=0.0_2			,			snake_case_					:      Dict=0.0			,			snake_case_					:      str=False			,			snake_case_					:      Optional[int]=True			,			snake_case_					:      Any=3			,			snake_case_					:      int=1			,			snake_case_					:      int=0			,			snake_case_					:      Optional[Any]=2			,			snake_case_					:      str=True			,			snake_case_					:      int=2			,			snake_case_					:      Union[str, Any]=2			,			**snake_case_					:      int			,			):



								'''simple docstring'''



								snake_case__						:       Union[str, Any]       						=  vocab_size
								snake_case__						:       int       						=  max_position_embeddings
								snake_case__						:       List[str]       						=  d_model
								snake_case__						:       Optional[int]       						=  encoder_ffn_dim
								snake_case__						:       Union[str, Any]       						=  encoder_layers
								snake_case__						:       Tuple       						=  encoder_attention_heads
								snake_case__						:       List[Any]       						=  decoder_ffn_dim
								snake_case__						:       Optional[Any]       						=  decoder_layers
								snake_case__						:       Tuple       						=  decoder_attention_heads
								snake_case__						:       Any       						=  dropout
								snake_case__						:       str       						=  attention_dropout
								snake_case__						:       Optional[int]       						=  activation_dropout
								snake_case__						:       Tuple       						=  activation_function
								snake_case__						:       Optional[int]       						=  init_std
								snake_case__						:       Optional[Any]       						=  encoder_layerdrop
								snake_case__						:       Tuple       						=  decoder_layerdrop
								snake_case__						:       Any       						=  classifier_dropout
								snake_case__						:       List[str]       						=  use_cache
								snake_case__						:       Tuple       						=  encoder_layers
								snake_case__						:       Union[str, Any]       						=  scale_embedding  # scale factor will be sqrt(d_model) if True

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

								# ensure backward compatibility for BART CNN models
								if self.forced_bos_token_id is None and kwargs.get('''force_bos_token_to_be_generated'''			,			snake_case_  ):
										snake_case__						:       Union[str, Any]       						=  self.bos_token_id
										warnings.warn(
										    F"""Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. """
										    '''The config can simply be saved and uploaded again to be fixed.'''  )





class     a			(				SCREAMING_SNAKE_CASE       ):






						"""simple docstring"""




						@property
						def       __magic_name__							(							self					:      List[str]  ):



								'''simple docstring'''



								if self.task in ["default", "seq2seq-lm"]:
										snake_case__						:       Optional[int]       						=  OrderedDict(
										    [
										        ('''input_ids''', {0: '''batch''', 1: '''encoder_sequence'''}),
										        ('''attention_mask''', {0: '''batch''', 1: '''encoder_sequence'''}),
										    ]  )

										if self.use_past:
												snake_case__						:       List[str]       						=  {0: '''batch'''}
												snake_case__						:       int       						=  {0: '''batch''', 1: '''past_decoder_sequence + sequence'''}
										else:
												snake_case__						:       List[Any]       						=  {0: '''batch''', 1: '''decoder_sequence'''}
												snake_case__						:       Optional[int]       						=  {0: '''batch''', 1: '''decoder_sequence'''}

										if self.use_past:
												self.fill_with_past_key_values_(snake_case_			,			direction='''inputs'''  )
								elif self.task == "causal-lm":
										# TODO: figure this case out.
										snake_case__						:       int       						=  OrderedDict(
										    [
										        ('''input_ids''', {0: '''batch''', 1: '''encoder_sequence'''}),
										        ('''attention_mask''', {0: '''batch''', 1: '''encoder_sequence'''}),
										    ]  )
										if self.use_past:
												snake_case__						,       snake_case__						:       Tuple       						=  self.num_layers
												for i in range(snake_case_  ):
														snake_case__						:       List[str]       						=  {0: '''batch''', 2: '''past_sequence + sequence'''}
														snake_case__						:       Tuple       						=  {0: '''batch''', 2: '''past_sequence + sequence'''}
								else:
										snake_case__						:       List[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       __magic_name__							(							self					:      Optional[int]  ):



								'''simple docstring'''



								if self.task in ["default", "seq2seq-lm"]:
										snake_case__						:       str       						=  super().outputs
								else:
										snake_case__						:       List[Any]       						=  super(snake_case_			,			self  ).outputs
										if self.use_past:
												snake_case__						,       snake_case__						:       Dict       						=  self.num_layers
												for i in range(snake_case_  ):
														snake_case__						:       Any       						=  {0: '''batch''', 2: '''past_sequence + sequence'''}
														snake_case__						:       Optional[int]       						=  {0: '''batch''', 2: '''past_sequence + sequence'''}
								return common_outputs







						def       __magic_name__							(							self					:      Optional[Any]			,			snake_case_					:      PreTrainedTokenizer			,			snake_case_					:      int = -1			,			snake_case_					:      int = -1			,			snake_case_					:      bool = False			,			snake_case_					:      Optional[TensorType] = None			,			):



								'''simple docstring'''



								snake_case__						:       Union[str, Any]       						=  self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
								    snake_case_			,			snake_case_			,			snake_case_			,			snake_case_			,			snake_case_  )

								# Generate decoder inputs
								snake_case__						:       Dict       						=  seq_length if not self.use_past else 1
								snake_case__						:       Optional[Any]       						=  self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
								    snake_case_			,			snake_case_			,			snake_case_			,			snake_case_			,			snake_case_  )
								snake_case__						:       List[str]       						=  {F"""decoder_{name}""": tensor for name, tensor in decoder_inputs.items()}
								snake_case__						:       str       						=  dict(**snake_case_			,			**snake_case_  )

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

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

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

										for _ in range(snake_case_  ):
												common_inputs["past_key_values"].append(
												    (
												        torch.zeros(snake_case_  ),
												        torch.zeros(snake_case_  ),
												        torch.zeros(snake_case_  ),
												        torch.zeros(snake_case_  ),
												    )  )
										# TODO: test this.
										snake_case__						:       int       						=  encoder_shape if remaining_side_name == '''encoder''' else decoder_shape
										for _ in range(snake_case_			,			snake_case_  ):
												common_inputs["past_key_values"].append((torch.zeros(snake_case_  ), torch.zeros(snake_case_  ))  )
								return common_inputs







						def       __magic_name__							(							self					:      List[str]			,			snake_case_					:      PreTrainedTokenizer			,			snake_case_					:      int = -1			,			snake_case_					:      int = -1			,			snake_case_					:      bool = False			,			snake_case_					:      Optional[TensorType] = None			,			):



								'''simple docstring'''



								snake_case__						:       Any       						=  self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
								    snake_case_			,			snake_case_			,			snake_case_			,			snake_case_			,			snake_case_  )

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

										snake_case__						:       List[Any]       						=  common_inputs['''attention_mask'''].dtype
										snake_case__						:       List[Any]       						=  torch.cat(
										    [common_inputs['''attention_mask'''], torch.ones(snake_case_			,			snake_case_			,			dtype=snake_case_  )]			,			dim=1  )
										snake_case__						:       Optional[Any]       						=  [
										    (torch.zeros(snake_case_  ), torch.zeros(snake_case_  )) for _ in range(snake_case_  )
										]
								return common_inputs







						def       __magic_name__							(							self					:      int			,			snake_case_					:      PreTrainedTokenizer			,			snake_case_					:      int = -1			,			snake_case_					:      int = -1			,			snake_case_					:      bool = False			,			snake_case_					:      Optional[TensorType] = None			,			):



								'''simple docstring'''



								snake_case__						:       str       						=  compute_effective_axis_dimension(
								    snake_case_			,			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
								snake_case__						:       List[Any]       						=  tokenizer.num_special_tokens_to_add(snake_case_  )
								snake_case__						:       List[str]       						=  compute_effective_axis_dimension(
								    snake_case_			,			fixed_dimension=OnnxConfig.default_fixed_sequence			,			num_token_to_add=snake_case_  )

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







						def       __magic_name__							(							self					:      Optional[Any]			,			snake_case_					:      PreTrainedTokenizer			,			snake_case_					:      int = -1			,			snake_case_					:      int = -1			,			snake_case_					:      bool = False			,			snake_case_					:      Optional[TensorType] = None			,			):



								'''simple docstring'''



								if self.task in ["default", "seq2seq-lm"]:
										snake_case__						:       int       						=  self._generate_dummy_inputs_for_default_and_seqaseq_lm(
										    snake_case_			,			batch_size=snake_case_			,			seq_length=snake_case_			,			is_pair=snake_case_			,			framework=snake_case_  )

								elif self.task == "causal-lm":
										snake_case__						:       Optional[Any]       						=  self._generate_dummy_inputs_for_causal_lm(
										    snake_case_			,			batch_size=snake_case_			,			seq_length=snake_case_			,			is_pair=snake_case_			,			framework=snake_case_  )
								else:
										snake_case__						:       Optional[int]       						=  self._generate_dummy_inputs_for_sequence_classification_and_question_answering(
										    snake_case_			,			batch_size=snake_case_			,			seq_length=snake_case_			,			is_pair=snake_case_			,			framework=snake_case_  )

								return common_inputs







						def       __magic_name__							(							self					:      Tuple			,			snake_case_					:      List[str]			,			snake_case_					:      Union[str, Any]			,			snake_case_					:      Any			,			snake_case_					:      Any  ):



								'''simple docstring'''



								if self.task in ["default", "seq2seq-lm"]:
										snake_case__						:       Optional[Any]       						=  super()._flatten_past_key_values_(snake_case_			,			snake_case_			,			snake_case_			,			snake_case_  )
								else:
										snake_case__						:       Union[str, Any]       						=  super(snake_case_			,			self  )._flatten_past_key_values_(
										    snake_case_			,			snake_case_			,			snake_case_			,			snake_case_  )



