"""simple docstring"""







def     __UpperCAmelCase							(       UpperCAmelCase_       :							Optional[Any]    )				->     int:

	'''simple docstring'''





	__snake_case     :				Optional[Any] 						=					[list(UpperCAmelCase_    ) for row in matrix]
	if matrix and isinstance(UpperCAmelCase_     ,				UpperCAmelCase_    ):
		if isinstance(matrix[0]     ,				UpperCAmelCase_    ):
			__snake_case     :				int 						=					0
			for row in matrix:
				if prev_len == 0:
					__snake_case     :				Any 						=					len(UpperCAmelCase_    )
					__snake_case     :				Optional[Any] 						=					True
				else:
					__snake_case     :				List[Any] 						=					prev_len == len(UpperCAmelCase_    )
		else:
			__snake_case     :				Dict 						=					True
	else:
		__snake_case     :				Dict 						=					False

	return result
def     __UpperCAmelCase							(       UpperCAmelCase_       :							List[Any]    )				->     Dict:

	'''simple docstring'''





	if check_matrix(UpperCAmelCase_    ) and len(UpperCAmelCase_    ) > 0:
		__snake_case     :				Tuple 						=					[list(UpperCAmelCase_    ) for row in a]
		__snake_case     :				Union[str, Any] 						=					len(UpperCAmelCase_    )
		if isinstance(a[0]     ,				UpperCAmelCase_    ):
			__snake_case     :				Union[str, Any] 						=					len(a[0]    )
		else:
			for dat in a:
				print(UpperCAmelCase_    )
			return

		# horizotal printing increasing
		for i in range(0     ,				UpperCAmelCase_    ):
			print(a[0][i]    )
		# vertical printing down
		for i in range(1     ,				UpperCAmelCase_    ):
			print(a[i][mat_col - 1]    )
		# horizotal printing decreasing
		if mat_row > 1:
			for i in range(mat_col - 2     ,				-1     ,				-1    ):
				print(a[mat_row - 1][i]    )
        # vertical printing up
		for i in range(mat_row - 2     ,				0     ,				-1    ):
			print(a[i][0]    )
		__snake_case     :				List[str] 						=					[row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
		if len(UpperCAmelCase_    ) > 0:
			spiral_print_clockwise(UpperCAmelCase_    )
		else:
			return
	else:
		print('Not a valid matrix'    )
		return
def     __UpperCAmelCase							(       UpperCAmelCase_       :							Union[str, Any]    )				->     int:

	'''simple docstring'''





	if matrix:
		return list(matrix.pop(0    )    ) + spiral_traversal(list(zip(*UpperCAmelCase_    )    )[::-1]    )
	else:
		return []


# driver code
if __name__ == "__main__":
	import doctest

	doctest.testmod()

	_a	:	str=					[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
	spiral_print_clockwise(a)











'''simple docstring'''





import functools
import operator

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


a		:	Dict       =      logging.get_logger(__name__)

a		:	Optional[int]       =      {
    '''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      UpperCamelCase       (	snake_case__       ):
  a     :int          =					'hubert'



  def __init__(			self		,     __lowerCAmelCase=32		,     __lowerCAmelCase=768		,     __lowerCAmelCase=12		,     __lowerCAmelCase=12		,     __lowerCAmelCase=3072		,     __lowerCAmelCase="gelu"		,     __lowerCAmelCase=0.1		,     __lowerCAmelCase=0.1		,     __lowerCAmelCase=0.1		,     __lowerCAmelCase=True		,     __lowerCAmelCase=0.0		,     __lowerCAmelCase=0.1		,     __lowerCAmelCase=0.1		,     __lowerCAmelCase=0.02		,     __lowerCAmelCase=1e-5		,     __lowerCAmelCase="group"		,     __lowerCAmelCase="gelu"		,     __lowerCAmelCase=(512, 512, 512, 512, 512, 512, 512)		,     __lowerCAmelCase=(5, 2, 2, 2, 2, 2, 2)		,     __lowerCAmelCase=(10, 3, 3, 3, 3, 2, 2)		,     __lowerCAmelCase=False		,     __lowerCAmelCase=128		,     __lowerCAmelCase=16		,     __lowerCAmelCase=False		,     __lowerCAmelCase=True		,     __lowerCAmelCase=0.05		,     __lowerCAmelCase=10		,     __lowerCAmelCase=2		,     __lowerCAmelCase=0.0		,     __lowerCAmelCase=10		,     __lowerCAmelCase=0		,     __lowerCAmelCase="sum"		,     __lowerCAmelCase=False		,     __lowerCAmelCase=False		,     __lowerCAmelCase=256		,     __lowerCAmelCase=0		,     __lowerCAmelCase=1		,     __lowerCAmelCase=2		,     **__lowerCAmelCase		,     ):







      '''simple docstring'''


      super().__init__(**__lowerCAmelCase		,     pad_token_id=__lowerCAmelCase		,     bos_token_id=__lowerCAmelCase		,     eos_token_id=__lowerCAmelCase )
      _a				:							List[Any]							       =      hidden_size
      _a				:							Union[str, Any]							       =      feat_extract_norm
      _a				:							Any							       =      feat_extract_activation
      _a				:							Tuple							       =      list(__lowerCAmelCase )
      _a				:							List[Any]							       =      list(__lowerCAmelCase )
      _a				:							Any							       =      list(__lowerCAmelCase )
      _a				:							Optional[int]							       =      conv_bias
      _a				:							Tuple							       =      num_conv_pos_embeddings
      _a				:							Optional[int]							       =      num_conv_pos_embedding_groups
      _a				:							Tuple							       =      len(self.conv_dim )
      _a				:							int							       =      num_hidden_layers
      _a				:							Optional[Any]							       =      intermediate_size
      _a				:							Dict							       =      hidden_act
      _a				:							Tuple							       =      num_attention_heads
      _a				:							Tuple							       =      hidden_dropout
      _a				:							str							       =      attention_dropout
      _a				:							Union[str, Any]							       =      activation_dropout
      _a				:							int							       =      feat_proj_layer_norm
      _a				:							List[Any]							       =      feat_proj_dropout
      _a				:							Any							       =      final_dropout
      _a				:							Dict							       =      layerdrop
      _a				:							List[str]							       =      layer_norm_eps
      _a				:							Any							       =      initializer_range
      _a				:							List[str]							       =      vocab_size
      _a				:							int							       =      do_stable_layer_norm
      _a				:							str							       =      use_weighted_layer_sum
      _a				:							Optional[Any]							       =      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
      _a				:							str							       =      apply_spec_augment
      _a				:							List[Any]							       =      mask_time_prob
      _a				:							List[Any]							       =      mask_time_length
      _a				:							List[Any]							       =      mask_time_min_masks
      _a				:							Union[str, Any]							       =      mask_feature_prob
      _a				:							str							       =      mask_feature_length
      _a				:							Any							       =      mask_feature_min_masks

      # ctc loss
      _a				:							Tuple							       =      ctc_loss_reduction
      _a				:							Optional[int]							       =      ctc_zero_infinity



  @property
  def     a_							(			self ):







      '''simple docstring'''


      return functools.reduce(operator.mul		,     self.conv_stride		,     1 )


