






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCamelCase											=      logging.get_logger(__name__)

UpperCamelCase											=      {
    '''google/electra-small-generator''': '''https://huggingface.co/google/electra-small-generator/resolve/main/config.json''',
    '''google/electra-base-generator''': '''https://huggingface.co/google/electra-base-generator/resolve/main/config.json''',
    '''google/electra-large-generator''': '''https://huggingface.co/google/electra-large-generator/resolve/main/config.json''',
    '''google/electra-small-discriminator''': (
        '''https://huggingface.co/google/electra-small-discriminator/resolve/main/config.json'''
    ),
    '''google/electra-base-discriminator''': (
        '''https://huggingface.co/google/electra-base-discriminator/resolve/main/config.json'''
    ),
    '''google/electra-large-discriminator''': (
        '''https://huggingface.co/google/electra-large-discriminator/resolve/main/config.json'''
    ),
}




class 	lowerCamelCase__				(							UpperCAmelCase ):
      lowerCamelCase_							:   Any											=	'electra'






      def __init__(self					:    str		,		_snake_case					:    List[Any]=3_0522		,		_snake_case					:    Optional[int]=128		,		_snake_case					:    int=256		,		_snake_case					:    Optional[int]=12		,		_snake_case					:    Optional[int]=4		,		_snake_case					:    List[Any]=1024		,		_snake_case					:    Dict="gelu"		,		_snake_case					:    List[Any]=0.1		,		_snake_case					:    Union[str, Any]=0.1		,		_snake_case					:    str=512		,		_snake_case					:    List[str]=2		,		_snake_case					:    Any=0.02		,		_snake_case					:    Tuple=1e-12		,		_snake_case					:    Dict="first"		,		_snake_case					:    str=True		,		_snake_case					:    str="gelu"		,		_snake_case					:    List[str]=0.1		,		_snake_case					:    str=0		,		_snake_case					:    Tuple="absolute"		,		_snake_case					:    Optional[Any]=True		,		_snake_case					:    Any=None		,		**_snake_case					:    List[str]		,		)       ->   List[Any]:


       """simple docstring"""






       super().__init__(pad_token_id=_snake_case		,		**_snake_case		)

       lowerCamelCase_							:    Union[str, Any]							=     vocab_size
       lowerCamelCase_							:    List[Any]							=     embedding_size
       lowerCamelCase_							:    List[str]							=     hidden_size
       lowerCamelCase_							:    List[str]							=     num_hidden_layers
       lowerCamelCase_							:    List[str]							=     num_attention_heads
       lowerCamelCase_							:    List[Any]							=     intermediate_size
       lowerCamelCase_							:    str							=     hidden_act
       lowerCamelCase_							:    List[Any]							=     hidden_dropout_prob
       lowerCamelCase_							:    Dict							=     attention_probs_dropout_prob
       lowerCamelCase_							:    Optional[int]							=     max_position_embeddings
       lowerCamelCase_							:    Optional[int]							=     type_vocab_size
       lowerCamelCase_							:    Optional[int]							=     initializer_range
       lowerCamelCase_							:    Any							=     layer_norm_eps

       lowerCamelCase_							:    List[str]							=     summary_type
       lowerCamelCase_							:    str							=     summary_use_proj
       lowerCamelCase_							:    Any							=     summary_activation
       lowerCamelCase_							:    Union[str, Any]							=     summary_last_dropout
       lowerCamelCase_							:    int							=     position_embedding_type
       lowerCamelCase_							:    List[str]							=     use_cache
       lowerCamelCase_							:    Dict							=     classifier_dropout




class 	lowerCamelCase__				(							UpperCAmelCase ):






      @property
      def      UpperCAmelCase_     (self					:    Any		)       ->   Mapping[str, Mapping[int, str]]:


       """simple docstring"""






       if self.task == "multiple-choice":
        lowerCamelCase_							:    Dict							=     {0: 'batch', 1: 'choice', 2: 'sequence'}
       else:
        lowerCamelCase_							:    Any							=     {0: 'batch', 1: 'sequence'}
       return OrderedDict(
           [
               ('input_ids', dynamic_axis),
               ('attention_mask', dynamic_axis),
               ('token_type_ids', dynamic_axis),
           ]		)








UpperCamelCase											=      [
    [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]




def       _a   (							lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__				)  ->      bool:
 return 0 <= row < rows and 0 <= col < cols




def       _a   (							lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__				)  ->      int:
 lowerCamelCase_							:    Tuple							=     len(lowerCamelCase__				)
 lowerCamelCase_							:    Tuple							=     len(mat[0]				)
 if is_safe(lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__				) and (row, col) not in seen and mat[row][col] == 1:
  seen.add((row, col)				)
  return (
      1
      + depth_first_search(row + 1 ,			lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__				)
      + depth_first_search(row - 1 ,			lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__				)
      + depth_first_search(lowerCamelCase__ ,			col + 1 ,			lowerCamelCase__ ,			lowerCamelCase__				)
      + depth_first_search(lowerCamelCase__ ,			col - 1 ,			lowerCamelCase__ ,			lowerCamelCase__				)
  )
 else:
  return 0




def       _a   (							lowerCamelCase__				)  ->      int:
 lowerCamelCase_							:    set							=     set()

 lowerCamelCase_							:    int							=     0
 for row, line in enumerate(lowerCamelCase__				):
  for col, item in enumerate(lowerCamelCase__				):
   if item == 1 and (row, col) not in seen:
    # Maximizing the area
    lowerCamelCase_							:    str							=     max(lowerCamelCase__ ,			depth_first_search(lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__ ,			lowerCamelCase__				)				)
 return max_area


if __name__ == "__main__":
       import doctest

       print(find_max_area(matrix))  # Output -> 6
       doctest.testmod()
