






'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase__ =			logging.get_logger(__name__)

UpperCamelCase__ =			{'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}


class        _UpperCAmelCase						(		snake_case			):
    __lowerCamelCase:   Dict		       =    'openai-gpt'
    __lowerCamelCase:   Any		       =    {
        'max_position_embeddings': 'n_positions',
        'hidden_size': 'n_embd',
        'num_attention_heads': 'n_head',
        'num_hidden_layers': 'n_layer',
    }




    def __init__(			self  :       Any  ,     a  :       List[Any]=4_0_4_7_8  ,     a  :       Dict=5_1_2  ,     a  :       Optional[Any]=7_6_8  ,     a  :       Tuple=1_2  ,     a  :       Any=1_2  ,     a  :       Any="gelu"  ,     a  :       Union[str, Any]=0.1  ,     a  :       Optional[Any]=0.1  ,     a  :       List[str]=0.1  ,     a  :       List[str]=1e-5  ,     a  :       Optional[int]=0.02  ,     a  :       Tuple="cls_index"  ,     a  :       str=True  ,     a  :       int=None  ,     a  :       Union[str, Any]=True  ,     a  :       Dict=0.1  ,     **a  :       int  ,     ):






       '''simple docstring'''






       lowercase_	:    int           =     vocab_size
       lowercase_	:    Tuple           =     n_positions
       lowercase_	:    List[str]           =     n_embd
       lowercase_	:    List[Any]           =     n_layer
       lowercase_	:    List[Any]           =     n_head
       lowercase_	:    Union[str, Any]           =     afn
       lowercase_	:    Any           =     resid_pdrop
       lowercase_	:    Dict           =     embd_pdrop
       lowercase_	:    Tuple           =     attn_pdrop
       lowercase_	:    Optional[Any]           =     layer_norm_epsilon
       lowercase_	:    List[Any]           =     initializer_range
       lowercase_	:    Optional[int]           =     summary_type
       lowercase_	:    Optional[Any]           =     summary_use_proj
       lowercase_	:    List[str]           =     summary_activation
       lowercase_	:    Tuple           =     summary_first_dropout
       lowercase_	:    Tuple           =     summary_proj_to_labels
       super().__init__(**a			)












'''simple docstring'''
def 		__SCREAMING_SNAKE_CASE					(  _UpperCamelCase							):


   """simple docstring"""




   return [
       {
           0: [1, 2],
           1: [0, 2],
           2: [0, 1, 3, 5],
           3: [2, 4],
           4: [3],
           5: [2, 6, 8],
           6: [5, 7],
           7: [6, 8],
           8: [5, 7],
       },
       {
           0: [6],
           1: [9],
           2: [4, 5],
           3: [4],
           4: [2, 3],
           5: [2],
           6: [0, 7],
           7: [6],
           8: [],
           9: [1],
       },
       {
           0: [4],
           1: [6],
           2: [],
           3: [5, 6, 7],
           4: [0, 6],
           5: [3, 8, 9],
           6: [1, 3, 4, 7],
           7: [3, 6, 8, 9],
           8: [5, 7],
           9: [5, 7],
       },
       {
           0: [1, 3],
           1: [0, 2, 4],
           2: [1, 3, 4],
           3: [0, 2, 4],
           4: [1, 2, 3],
       },
   ][index]




def 		__SCREAMING_SNAKE_CASE					(  _UpperCamelCase							):


   """simple docstring"""




   lowercase_	:    Dict           =     0
   lowercase_	:    Optional[Any]           =     len(_UpperCamelCase							)  # No of vertices in graph
   lowercase_	:    Union[str, Any]           =     [0] * n
   lowercase_	:    Optional[int]           =     [False] * n

   def dfs(_UpperCamelCase						,		_UpperCamelCase						,		_UpperCamelCase						,		_UpperCamelCase							):
      lowercase_	:    Union[str, Any]           =     True
      lowercase_	:    Dict           =     id_
      id_ += 1
      for to in graph[at]:
         if to == parent:
            pass
         elif not visited[to]:
            dfs(_UpperCamelCase						,		_UpperCamelCase						,		_UpperCamelCase						,		id_							)
            lowercase_	:    str           =     min(low[at]						,		low[to]							)
            if id_ <= low[to]:
               bridges.append((at, to) if at < to else (to, at)							)
         else:
            # This edge is a back edge and cannot be a bridge
            lowercase_	:    Optional[int]           =     min(low[at]						,		low[to]							)

   lowercase_	:    list[tuple[int, int]]           =     []
   for i in range(_UpperCamelCase							):
      if not visited[i]:
         dfs(_UpperCamelCase						,		-1						,		_UpperCamelCase						,		id_							)
   return bridges


if __name__ == "__main__":
 import doctest

 doctest.testmod()




