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


__lowerCAmelCase   :     Any      =						logging.get_logger(__name__)

__lowerCAmelCase   :     str      =						{
    "google/pegasus-x-base": "https://huggingface.co/google/pegasus-x-base/resolve/main/config.json",
    "google/pegasus-x-large": "https://huggingface.co/google/pegasus-x-large/resolve/main/config.json",
    # See all PEGASUS-X models at https://huggingface.co/models?filter=pegasus-x
}

class   __lowerCAmelCase		(		lowercase_ ):



      """simple docstring"""







      A__		:     Dict       				=      '''pegasus_x'''
      A__		:     List[str]       				=      ['''past_key_values''']
      A__		:     Union[str, Any]       				=      {'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}




      def __init__( self						:    Tuple			,    _snake_case						:    Dict=9_6103			,    _snake_case						:    Optional[int]=1_6384			,    _snake_case						:    List[str]=16			,    _snake_case						:    Optional[Any]=4096			,    _snake_case						:    int=16			,    _snake_case						:    List[str]=16			,    _snake_case						:    Tuple=4096			,    _snake_case						:    List[Any]=16			,    _snake_case						:    List[str]=0.0			,    _snake_case						:    str=0.0			,    _snake_case						:    Optional[int]=True			,    _snake_case						:    int=True			,    _snake_case						:    str="gelu"			,    _snake_case						:    List[Any]=1024			,    _snake_case						:    Dict=0.1			,    _snake_case						:    List[Any]=0.0			,    _snake_case						:    Tuple=0.0			,    _snake_case						:    Any=0.02			,    _snake_case						:    Optional[Any]=0			,    _snake_case						:    Optional[int]=True			,    _snake_case						:    Optional[Any]=0			,    _snake_case						:    Dict=1			,    _snake_case						:    Optional[Any]=1			,    _snake_case						:    str=32			,    _snake_case						:    Union[str, Any]=512			,    _snake_case						:    Optional[Any]=True			,    **_snake_case						:    Any			,    ):
          __lowercase						:     Dict		      =    vocab_size
          __lowercase						:     Any		      =    max_position_embeddings
          __lowercase						:     Any		      =    d_model
          __lowercase						:     List[str]		      =    encoder_ffn_dim
          __lowercase						:     Union[str, Any]		      =    encoder_layers
          __lowercase						:     List[Any]		      =    encoder_attention_heads
          __lowercase						:     Union[str, Any]		      =    decoder_ffn_dim
          __lowercase						:     Tuple		      =    decoder_layers
          __lowercase						:     Any		      =    decoder_attention_heads
          __lowercase						:     Union[str, Any]		      =    dropout
          __lowercase						:     Union[str, Any]		      =    attention_dropout
          __lowercase						:     Optional[Any]		      =    activation_dropout
          __lowercase						:     Any		      =    activation_function
          __lowercase						:     Tuple		      =    init_std
          __lowercase						:     List[str]		      =    encoder_layerdrop
          __lowercase						:     Tuple		      =    decoder_layerdrop
          __lowercase						:     Union[str, Any]		      =    use_cache
          __lowercase						:     List[str]		      =    encoder_layers
          __lowercase						:     Union[str, Any]		      =    scale_embedding  # scale factor will be sqrt(d_model) if True

          __lowercase						:     Tuple		      =    num_global_tokens
          __lowercase						:     List[Any]		      =    block_size
          __lowercase						:     Optional[int]		      =    stagger_local_blocks

          super().__init__(
              pad_token_id=UpperCamelCase_			,    eos_token_id=UpperCamelCase_			,    is_encoder_decoder=UpperCamelCase_			,    decoder_start_token_id=UpperCamelCase_			,    forced_eos_token_id=UpperCamelCase_			,    **UpperCamelCase_			,    )




      @property
      def 						snake_case_     ( self						:    Optional[int]			):
          return self.encoder_attention_heads




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




from __future__ import annotations

import math
from itertools import permutations


def       UpperCAmelCase_					(  __lowerCAmelCase		)	->  bool:

    if 1 < number < 4:
        # 2 and 3 are primes
        return True
    elif number < 2 or number % 2 == 0 or number % 3 == 0:
        # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
        return False

    # All primes number are in format of 6k +/- 1
    for i in range(5		,   int(math.sqrt(__lowerCAmelCase		) + 1		)		,   6		):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True


def       UpperCAmelCase_					(  __lowerCAmelCase = 7		)	->  int:
    __lowercase						:     Union[str, Any]		      =    ''''''.join(str(__lowerCAmelCase		) for i in range(1		,   n + 1		)		)
    __lowercase						:     Dict		      =    [int(''''''.join(__lowerCAmelCase		)		) for i in permutations(__lowerCAmelCase		,   __lowerCAmelCase		)]
    __lowercase						:     int		      =    [num for num in perm_list if is_prime(__lowerCAmelCase		)]
    return max(__lowerCAmelCase		) if pandigitals else 0


if __name__ == "__main__":
 print(F'{solution() = }')


