



"""simple docstring"""




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


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

_lowerCAmelCase    : List[str]							=							{
    "funnel-transformer/small": "https://huggingface.co/funnel-transformer/small/resolve/main/config.json",
    "funnel-transformer/small-base": "https://huggingface.co/funnel-transformer/small-base/resolve/main/config.json",
    "funnel-transformer/medium": "https://huggingface.co/funnel-transformer/medium/resolve/main/config.json",
    "funnel-transformer/medium-base": "https://huggingface.co/funnel-transformer/medium-base/resolve/main/config.json",
    "funnel-transformer/intermediate": (
        "https://huggingface.co/funnel-transformer/intermediate/resolve/main/config.json"
    ),
    "funnel-transformer/intermediate-base": (
        "https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/config.json"
    ),
    "funnel-transformer/large": "https://huggingface.co/funnel-transformer/large/resolve/main/config.json",
    "funnel-transformer/large-base": "https://huggingface.co/funnel-transformer/large-base/resolve/main/config.json",
    "funnel-transformer/xlarge": "https://huggingface.co/funnel-transformer/xlarge/resolve/main/config.json",
    "funnel-transformer/xlarge-base": "https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/config.json",
}






class      UpperCAmelCase_  (    _UpperCamelCase						):
      __SCREAMING_SNAKE_CASE						:       Any								=			'funnel'
      __SCREAMING_SNAKE_CASE						:       Optional[Any]								=			{
          'hidden_size': 'd_model',
          'num_attention_heads': 'n_head',
      }



      def __init__(					self					:     int					,     A					:     List[Any]=3_0_5_2_2					,     A					:     Optional[Any]=[4, 4, 4]					,     A					:     List[Any]=None					,     A					:     Dict=2					,     A					:     Dict=7_6_8					,     A					:     Union[str, Any]=1_2					,     A					:     Tuple=6_4					,     A					:     Dict=3_0_7_2					,     A					:     Tuple="gelu_new"					,     A					:     Optional[Any]=0.1					,     A					:     Union[str, Any]=0.1					,     A					:     Optional[int]=0.0					,     A					:     int=0.1					,     A					:     Optional[int]=None					,     A					:     str=1e-9					,     A					:     Any="mean"					,     A					:     Optional[int]="relative_shift"					,     A					:     Optional[Any]=True					,     A					:     int=True					,     A					:     Union[str, Any]=True					,     **A					:     Union[str, Any]					,     ):
           _UpperCAmelCase      :     List[str]        =   vocab_size
           _UpperCAmelCase      :     int        =   block_sizes
           _UpperCAmelCase      :     Tuple        =   [1] * len(A						) if block_repeats is None else block_repeats
           assert len(A						) == len(
               self.block_repeats						), "`block_sizes` and `block_repeats` should have the same length."
           _UpperCAmelCase      :     Tuple        =   num_decoder_layers
           _UpperCAmelCase      :     Optional[Any]        =   d_model
           _UpperCAmelCase      :     Dict        =   n_head
           _UpperCAmelCase      :     Optional[int]        =   d_head
           _UpperCAmelCase      :     str        =   d_inner
           _UpperCAmelCase      :     Optional[int]        =   hidden_act
           _UpperCAmelCase      :     Any        =   hidden_dropout
           _UpperCAmelCase      :     Dict        =   attention_dropout
           _UpperCAmelCase      :     Union[str, Any]        =   activation_dropout
           _UpperCAmelCase      :     Optional[int]        =   initializer_range
           _UpperCAmelCase      :     List[Any]        =   initializer_std
           _UpperCAmelCase      :     Dict        =   layer_norm_eps
           assert pooling_type in [
               "mean",
               "max",
           ], f'Got {pooling_type} for `pooling_type` but only \'mean\' and \'max\' are supported.'
           _UpperCAmelCase      :     Optional[Any]        =   pooling_type
           assert attention_type in [
               "relative_shift",
               "factorized",
           ], f'Got {attention_type} for `attention_type` but only \'relative_shift\' and \'factorized\' are supported.'
           _UpperCAmelCase      :     int        =   attention_type
           _UpperCAmelCase      :     int        =   separate_cls
           _UpperCAmelCase      :     Optional[int]        =   truncate_seq
           _UpperCAmelCase      :     Union[str, Any]        =   pool_q_only

           super().__init__(**A						)



      @property
      def 						snake_case_ (					self					:     List[Any]						):
           return sum(self.block_sizes						)



      @num_hidden_layers.setter
      def 						snake_case_ (					self					:     Optional[Any]					,     A					:     List[str]						):
           raise NotImplementedError(
               "This model does not support the setting of `num_hidden_layers`. Please set `block_sizes`."						)



      @property
      def 						snake_case_ (					self					:     Any						):
           return len(self.block_sizes						)



      @num_blocks.setter
      def 						snake_case_ (					self					:     Optional[Any]					,     A					:     int						):
           raise NotImplementedError("This model does not support the setting of `num_blocks`. Please set `block_sizes`."						)





"""simple docstring"""




from __future__ import annotations

from typing import Any

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						list[Any]    )  ->       None:





     '''simple docstring'''

     create_state_space_tree(SCREAMING_SNAKE_CASE__						,  []						,  0    )

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						list[Any]						,  SCREAMING_SNAKE_CASE__     :						list[Any]						,  SCREAMING_SNAKE_CASE__     :						int    )  ->       None:





     '''simple docstring'''

     if index == len(SCREAMING_SNAKE_CASE__    ):
          print(SCREAMING_SNAKE_CASE__    )
          return

     create_state_space_tree(SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__						,  index + 1    )
     current_subsequence.append(sequence[index]    )
     create_state_space_tree(SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__						,  index + 1    )
     current_subsequence.pop()


if __name__ == "__main__":
 _lowerCAmelCase    : list[Any]							=							[3, 1, 2, 4]
 generate_all_subsequences(seq)

 seq.clear()
 seq.extend(["A", "B", "C"])
 generate_all_subsequences(seq)
