



from typing import List, Optional

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


__snake_case						:Optional[int]      		=     logging.get_logger(__name__)

__snake_case						:Union[str, Any]      		=     {
    '''huggingface/autoformer-tourism-monthly''': '''https://huggingface.co/huggingface/autoformer-tourism-monthly/resolve/main/config.json''',
}

class     _A       (	__UpperCAmelCase    ):
       UpperCamelCase__  :    Optional[int]											=						'''autoformer'''
       UpperCamelCase__  :    List[str]											=						{
           '''hidden_size''': '''d_model''',
           '''num_attention_heads''': '''encoder_attention_heads''',
           '''num_hidden_layers''': '''encoder_layers''',
       }



       def __init__(		self							:     Optional[int]     ,		__SCREAMING_SNAKE_CASE							:     Optional[int] = None     ,		__SCREAMING_SNAKE_CASE							:     Optional[int] = None     ,		__SCREAMING_SNAKE_CASE							:     str = "student_t"     ,		__SCREAMING_SNAKE_CASE							:     str = "nll"     ,		__SCREAMING_SNAKE_CASE							:     int = 1     ,		__SCREAMING_SNAKE_CASE							:     List[int] = [1, 2, 3, 4, 5, 6, 7]     ,		__SCREAMING_SNAKE_CASE							:     bool = True     ,		__SCREAMING_SNAKE_CASE							:     int = 0     ,		__SCREAMING_SNAKE_CASE							:     int = 0     ,		__SCREAMING_SNAKE_CASE							:     int = 0     ,		__SCREAMING_SNAKE_CASE							:     int = 0     ,		__SCREAMING_SNAKE_CASE							:     Optional[List[int]] = None     ,		__SCREAMING_SNAKE_CASE							:     Optional[List[int]] = None     ,		__SCREAMING_SNAKE_CASE							:     int = 64     ,		__SCREAMING_SNAKE_CASE							:     int = 2     ,		__SCREAMING_SNAKE_CASE							:     int = 2     ,		__SCREAMING_SNAKE_CASE							:     int = 2     ,		__SCREAMING_SNAKE_CASE							:     int = 2     ,		__SCREAMING_SNAKE_CASE							:     int = 32     ,		__SCREAMING_SNAKE_CASE							:     int = 32     ,		__SCREAMING_SNAKE_CASE							:     str = "gelu"     ,		__SCREAMING_SNAKE_CASE							:     float = 0.1     ,		__SCREAMING_SNAKE_CASE							:     float = 0.1     ,		__SCREAMING_SNAKE_CASE							:     float = 0.1     ,		__SCREAMING_SNAKE_CASE							:     float = 0.1     ,		__SCREAMING_SNAKE_CASE							:     float = 0.1     ,		__SCREAMING_SNAKE_CASE							:     int = 100     ,		__SCREAMING_SNAKE_CASE							:     float = 0.02     ,		__SCREAMING_SNAKE_CASE							:     bool = True     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=True     ,		__SCREAMING_SNAKE_CASE							:     int = 10     ,		__SCREAMING_SNAKE_CASE							:     int = 25     ,		__SCREAMING_SNAKE_CASE							:     int = 3     ,		**__SCREAMING_SNAKE_CASE							:     Tuple     ,		):


           '''simple docstring'''

           __a						       =				prediction_length
           __a						       =				context_length if context_length is not None else prediction_length
           __a						       =				distribution_output
           __a						       =				loss
           __a						       =				input_size
           __a						       =				num_time_features
           __a						       =				lags_sequence
           __a						       =				scaling
           __a						       =				num_dynamic_real_features
           __a						       =				num_static_real_features
           __a						       =				num_static_categorical_features
           if cardinality is not None and num_static_categorical_features > 0:
               if len(__SCREAMING_SNAKE_CASE) != num_static_categorical_features:
                   raise ValueError(
                       '''The cardinality should be a list of the same length as `num_static_categorical_features`''')
               __a						       =				cardinality
           else:
               __a						       =				[0]
           if embedding_dimension is not None and num_static_categorical_features > 0:
               if len(__SCREAMING_SNAKE_CASE) != num_static_categorical_features:
                   raise ValueError(
                       '''The embedding dimension should be a list of the same length as `num_static_categorical_features`''')
               __a						       =				embedding_dimension
           else:
               __a						       =				[min(50     ,		(cat + 1) // 2) for cat in self.cardinality]
           __a						       =				num_parallel_samples

           # Transformer architecture configuration
           __a						       =				input_size * len(self.lags_sequence) + self._number_of_features
           __a						       =				d_model
           __a						       =				encoder_attention_heads
           __a						       =				decoder_attention_heads
           __a						       =				encoder_ffn_dim
           __a						       =				decoder_ffn_dim
           __a						       =				encoder_layers
           __a						       =				decoder_layers

           __a						       =				dropout
           __a						       =				attention_dropout
           __a						       =				activation_dropout
           __a						       =				encoder_layerdrop
           __a						       =				decoder_layerdrop

           __a						       =				activation_function
           __a						       =				init_std

           __a						       =				use_cache

           # Autoformer
           __a						       =				label_length
           __a						       =				moving_average
           __a						       =				autocorrelation_factor

           super().__init__(is_encoder_decoder=__SCREAMING_SNAKE_CASE     ,		**__SCREAMING_SNAKE_CASE)





       @property
       def 		_lowerCamelCase			(		self							:     Dict):


           '''simple docstring'''

           return (
               sum(self.embedding_dimension)
               + self.num_dynamic_real_features
               + self.num_time_features
               + self.num_static_real_features
               + self.input_size * 2  # the log1p(abs(loc)) and log(scale) features
           )










from collections import defaultdict





def      __snake_case	(			_UpperCAmelCase   , _UpperCAmelCase				):
    __a						       =				first_str.lower().strip()
    __a						       =				second_str.lower().strip()

    # Remove whitespace
    __a						       =				first_str.replace(''' '''   , ''''''				)
    __a						       =				second_str.replace(''' '''   , ''''''				)

    # Strings of different lengths are not anagrams
    if len(_UpperCAmelCase				) != len(_UpperCAmelCase				):
        return False

    # Default values for count should be 0
    __a						       =				defaultdict(_UpperCAmelCase				)

    # For each character in input strings,
    # increment count in the corresponding
    for i in range(len(_UpperCAmelCase				)				):
        count[first_str[i]] += 1
        count[second_str[i]] -= 1

    return all(_count == 0 for _count in count.values()				)


if __name__ == "__main__":
 from doctest import testmod

 testmod()
 __snake_case						:Any      		=     input('''Enter the first string ''').strip()
 __snake_case						:int      		=     input('''Enter the second string ''').strip()

 __snake_case						:int      		=     check_anagrams(input_a, input_b)
 print(f'{input_a} and {input_b} are {"" if status else "not "}anagrams.')





