




"""simple docstring"""


from ...configuration_utils import PretrainedConfig
from ...utils import logging


A_						=				logging.get_logger(__name__)

A_						=				{
    '''facebook/s2t-wav2vec2-large-en-de''': (
        '''https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json'''
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}






class 					lowercase(     __a ):







 '''simple docstring'''





 lowercase__ 					=					"speech_to_text_2"
 lowercase__ 					=					["past_key_values"]
 lowercase__ 					=					{"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}


 def __init__(				self:		List[str],      a_:		str=10_000,      a_:		str=6,      a_:		List[Any]=2_048,      a_:		Optional[int]=4,      a_:		List[str]=0.0,      a_:		Optional[int]=True,      a_:		List[str]="relu",      a_:		Optional[Any]=256,      a_:		Any=0.1,      a_:		List[str]=0.0,      a_:		Optional[int]=0.0,      a_:		Optional[Any]=0.02,      a_:		Union[str, Any]=2,      a_:		List[str]=True,      a_:		Optional[Any]=1,      a_:		Dict=0,      a_:		Dict=2,      a_:		Optional[int]=1_024,      **a_:		Any,      ):




   '''simple docstring'''



   _snake_case							:		Union[str, Any]								=  vocab_size
   _snake_case							:		str								=  d_model
   _snake_case							:		Tuple								=  decoder_ffn_dim
   _snake_case							:		Optional[int]								=  decoder_layers
   _snake_case							:		Optional[Any]								=  decoder_attention_heads
   _snake_case							:		Union[str, Any]								=  dropout
   _snake_case							:		List[str]								=  attention_dropout
   _snake_case							:		str								=  activation_dropout
   _snake_case							:		Union[str, Any]								=  activation_function
   _snake_case							:		List[str]								=  init_std
   _snake_case							:		int								=  decoder_layerdrop
   _snake_case							:		int								=  use_cache
   _snake_case							:		str								=  decoder_layers
   _snake_case							:		Tuple								=  scale_embedding  # scale factor will be sqrt(d_model) if True
   _snake_case							:		int								=  max_target_positions

   super().__init__(
       pad_token_id=a_,      bos_token_id=a_,      eos_token_id=a_,      decoder_start_token_id=a_,      **a_,      )




from collections import defaultdict

from graphs.minimum_spanning_tree_prims import prisms_algorithm as mst





def 			lowerCamelCase_ (				):
				lowerCamelCase_	,    lowerCamelCase_						=			9, 1_4  # noqa: F841
				lowerCamelCase_						=			[
				    [0, 1, 4],
				    [0, 7, 8],
				    [1, 2, 8],
				    [7, 8, 7],
				    [7, 6, 1],
				    [2, 8, 2],
				    [8, 6, 6],
				    [2, 3, 7],
				    [2, 5, 4],
				    [6, 5, 2],
				    [3, 5, 1_4],
				    [3, 4, 9],
				    [5, 4, 1_0],
				    [1, 7, 1_1],
				]

				lowerCamelCase_						=			defaultdict(lowerCamelCase__    )
				for nodea, nodea, cost in edges:
								adjancency[nodea].append([nodea, cost]    )
								adjancency[nodea].append([nodea, cost]    )

				lowerCamelCase_						=			mst(lowerCamelCase__    )

				lowerCamelCase_						=			[
				    [7, 6, 1],
				    [2, 8, 2],
				    [6, 5, 2],
				    [0, 1, 4],
				    [2, 5, 4],
				    [2, 3, 7],
				    [0, 7, 8],
				    [3, 4, 9],
				]

				for answer in expected:
								lowerCamelCase_						=			tuple(answer[:2]    )
								lowerCamelCase_						=			tuple(edge[::-1]    )
								assert edge in result or reverse in result


