
'''simple docstring'''







import functools
import operator

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


_snake_case					: Any     			=					logging.get_logger(__name__)

_snake_case					: Tuple     			=					{
    """facebook/hubert-base-ls960""": """https://huggingface.co/facebook/hubert-base-ls960/resolve/main/config.json""",
    # See all Hubert models at https://huggingface.co/models?filter=hubert
}


class       lowerCAmelCase			(					__UpperCAmelCase      ):
		a				:       str							=       """hubert"""




		def __init__(					self       ,    UpperCamelCase=32       ,    UpperCamelCase=768       ,    UpperCamelCase=12       ,    UpperCamelCase=12       ,    UpperCamelCase=3_072       ,    UpperCamelCase="gelu"       ,    UpperCamelCase=0.1       ,    UpperCamelCase=0.1       ,    UpperCamelCase=0.1       ,    UpperCamelCase=True       ,    UpperCamelCase=0.0       ,    UpperCamelCase=0.1       ,    UpperCamelCase=0.1       ,    UpperCamelCase=0.02       ,    UpperCamelCase=1e-5       ,    UpperCamelCase="group"       ,    UpperCamelCase="gelu"       ,    UpperCamelCase=(512, 512, 512, 512, 512, 512, 512)       ,    UpperCamelCase=(5, 2, 2, 2, 2, 2, 2)       ,    UpperCamelCase=(10, 3, 3, 3, 3, 2, 2)       ,    UpperCamelCase=False       ,    UpperCamelCase=128       ,    UpperCamelCase=16       ,    UpperCamelCase=False       ,    UpperCamelCase=True       ,    UpperCamelCase=0.05       ,    UpperCamelCase=10       ,    UpperCamelCase=2       ,    UpperCamelCase=0.0       ,    UpperCamelCase=10       ,    UpperCamelCase=0       ,    UpperCamelCase="sum"       ,    UpperCamelCase=False       ,    UpperCamelCase=False       ,    UpperCamelCase=256       ,    UpperCamelCase=0       ,    UpperCamelCase=1       ,    UpperCamelCase=2       ,    **UpperCamelCase       ,    ):
								super().__init__(**UpperCamelCase       ,    pad_token_id=UpperCamelCase       ,    bos_token_id=UpperCamelCase       ,    eos_token_id=UpperCamelCase   )
								_SCREAMING_SNAKE_CASE					=			hidden_size
								_SCREAMING_SNAKE_CASE					=			feat_extract_norm
								_SCREAMING_SNAKE_CASE					=			feat_extract_activation
								_SCREAMING_SNAKE_CASE					=			list(UpperCamelCase   )
								_SCREAMING_SNAKE_CASE					=			list(UpperCamelCase   )
								_SCREAMING_SNAKE_CASE					=			list(UpperCamelCase   )
								_SCREAMING_SNAKE_CASE					=			conv_bias
								_SCREAMING_SNAKE_CASE					=			num_conv_pos_embeddings
								_SCREAMING_SNAKE_CASE					=			num_conv_pos_embedding_groups
								_SCREAMING_SNAKE_CASE					=			len(self.conv_dim   )
								_SCREAMING_SNAKE_CASE					=			num_hidden_layers
								_SCREAMING_SNAKE_CASE					=			intermediate_size
								_SCREAMING_SNAKE_CASE					=			hidden_act
								_SCREAMING_SNAKE_CASE					=			num_attention_heads
								_SCREAMING_SNAKE_CASE					=			hidden_dropout
								_SCREAMING_SNAKE_CASE					=			attention_dropout
								_SCREAMING_SNAKE_CASE					=			activation_dropout
								_SCREAMING_SNAKE_CASE					=			feat_proj_layer_norm
								_SCREAMING_SNAKE_CASE					=			feat_proj_dropout
								_SCREAMING_SNAKE_CASE					=			final_dropout
								_SCREAMING_SNAKE_CASE					=			layerdrop
								_SCREAMING_SNAKE_CASE					=			layer_norm_eps
								_SCREAMING_SNAKE_CASE					=			initializer_range
								_SCREAMING_SNAKE_CASE					=			vocab_size
								_SCREAMING_SNAKE_CASE					=			do_stable_layer_norm
								_SCREAMING_SNAKE_CASE					=			use_weighted_layer_sum
								_SCREAMING_SNAKE_CASE					=			classifier_proj_size

								if (
								    (len(self.conv_stride   ) != self.num_feat_extract_layers)
								    or (len(self.conv_kernel   ) != self.num_feat_extract_layers)
								    or (len(self.conv_dim   ) != self.num_feat_extract_layers)
								):
														raise ValueError(
														    "Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="
														    " `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="
														    F' {len(self.conv_dim   )}`, `len(config.conv_stride) = {len(self.conv_stride   )}`,'
														    F' `len(config.conv_kernel) = {len(self.conv_kernel   )}`.'   )

								# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
								_SCREAMING_SNAKE_CASE					=			apply_spec_augment
								_SCREAMING_SNAKE_CASE					=			mask_time_prob
								_SCREAMING_SNAKE_CASE					=			mask_time_length
								_SCREAMING_SNAKE_CASE					=			mask_time_min_masks
								_SCREAMING_SNAKE_CASE					=			mask_feature_prob
								_SCREAMING_SNAKE_CASE					=			mask_feature_length
								_SCREAMING_SNAKE_CASE					=			mask_feature_min_masks

								# ctc loss
								_SCREAMING_SNAKE_CASE					=			ctc_loss_reduction
								_SCREAMING_SNAKE_CASE					=			ctc_zero_infinity




		@property
		def      lowercase							(					self   ):
								return functools.reduce(operator.mul       ,    self.conv_stride       ,    1   )

'''simple docstring'''







class       lowerCAmelCase			:




		def __init__(					self       ,    UpperCamelCase=None   ):
								_SCREAMING_SNAKE_CASE					=			data
								_SCREAMING_SNAKE_CASE					=			None




		def __repr__(					self   ):
								_SCREAMING_SNAKE_CASE					=			""
								_SCREAMING_SNAKE_CASE					=			self
								while temp:
														string_rep += F'<{temp.data}> ---> '
														_SCREAMING_SNAKE_CASE					=			temp.next
								string_rep += "<END>"
								return string_rep



def       _a		(						_SCREAMING_SNAKE_CASE		: Any	):

						# if elements_list is empty
						if not elements_list:
												raise Exception("The Elements List is empty"	)

						# Set first element as Head
						_SCREAMING_SNAKE_CASE					=			Node(elements_list[0]	)
						_SCREAMING_SNAKE_CASE					=			head
						# Loop through elements from position 1
						for data in elements_list[1:]:
												_SCREAMING_SNAKE_CASE					=			Node(_SCREAMING_SNAKE_CASE	)
												_SCREAMING_SNAKE_CASE					=			current.next
						return head


_snake_case					: List[Any]     			=					[1, 3, 5, 32, 44, 12, 43]
print(F"List: {list_data}")
print("""Creating Linked List from List.""")
_snake_case					: List[Any]     			=					make_linked_list(list_data)
print("""Linked List:""")




print(linked_list)