




'''simple docstring'''





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


UpperCamelCase_		:     Union[str, Any]          =		logging.get_logger(__name__)

UpperCamelCase_		:     int          =		{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}

class   _a							(		__lowerCAmelCase				):
     SCREAMING_SNAKE_CASE_				:       List[str]       							=		"""megatron-bert"""






     def __init__(					self   ,_SCREAMING_SNAKE_CASE=29_056   ,_SCREAMING_SNAKE_CASE=1_024   ,_SCREAMING_SNAKE_CASE=24   ,_SCREAMING_SNAKE_CASE=16   ,_SCREAMING_SNAKE_CASE=4_096   ,_SCREAMING_SNAKE_CASE="gelu"   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=0.1   ,_SCREAMING_SNAKE_CASE=512   ,_SCREAMING_SNAKE_CASE=2   ,_SCREAMING_SNAKE_CASE=0.0_2   ,_SCREAMING_SNAKE_CASE=1e-12   ,_SCREAMING_SNAKE_CASE=0   ,_SCREAMING_SNAKE_CASE="absolute"   ,_SCREAMING_SNAKE_CASE=True   ,**_SCREAMING_SNAKE_CASE   ,)				->     Optional[int]:
          super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE   ,**_SCREAMING_SNAKE_CASE       )

          _snake_case				= vocab_size
          _snake_case				= hidden_size
          _snake_case				= num_hidden_layers
          _snake_case				= num_attention_heads
          _snake_case				= hidden_act
          _snake_case				= intermediate_size
          _snake_case				= hidden_dropout_prob
          _snake_case				= attention_probs_dropout_prob
          _snake_case				= max_position_embeddings
          _snake_case				= type_vocab_size
          _snake_case				= initializer_range
          _snake_case				= layer_norm_eps
          _snake_case				= position_embedding_type
          _snake_case				= use_cache








'''simple docstring'''





from __future__ import annotations

import collections
import pprint
from pathlib import Path





def       __a      (  _UpperCamelCase:       str       )		->					str:

     """simple docstring"""




     return "".join(sorted(_UpperCamelCase       )       )





def       __a      (  _UpperCamelCase:       str       )		->					list[str]:

     """simple docstring"""




     return word_by_signature[signature(_UpperCamelCase       )]


UpperCamelCase_		:     str          =		Path(__file__).parent.joinpath('''words.txt''').read_text(encoding='''utf-8''')
UpperCamelCase_		:     Dict          =		sorted({word.strip().lower() for word in data.splitlines()})

UpperCamelCase_		:     Optional[Any]          =		collections.defaultdict(list)
for word in word_list:
   word_by_signature[signature(word)].append(word)

if __name__ == "__main__":
   UpperCamelCase_		:     List[str]          =		{word: anagram(word) for word in word_list if len(anagram(word)) > 1}

   with open('''anagrams.txt''', '''w''') as file:
      file.write('''all_anagrams = \n ''')
      file.write(pprint.pformat(all_anagrams))


