






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


UpperCamelCase											=      logging.get_logger(__name__)

UpperCamelCase											=      {
    '''MCG-NJU/videomae-base''': '''https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json''',
}




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






      def __init__(self					:    Optional[Any]		,		_snake_case					:    List[Any]=224		,		_snake_case					:    str=16		,		_snake_case					:    Optional[int]=3		,		_snake_case					:    Dict=16		,		_snake_case					:    str=2		,		_snake_case					:    Dict=768		,		_snake_case					:    Dict=12		,		_snake_case					:    List[str]=12		,		_snake_case					:    Optional[Any]=3072		,		_snake_case					:    List[Any]="gelu"		,		_snake_case					:    Optional[int]=0.0		,		_snake_case					:    List[str]=0.0		,		_snake_case					:    Union[str, Any]=0.02		,		_snake_case					:    int=1e-12		,		_snake_case					:    List[str]=True		,		_snake_case					:    Optional[int]=True		,		_snake_case					:    Tuple=6		,		_snake_case					:    List[str]=384		,		_snake_case					:    Optional[int]=4		,		_snake_case					:    Union[str, Any]=1536		,		_snake_case					:    Optional[int]=True		,		**_snake_case					:    int		,		)       ->   List[str]:


       """simple docstring"""






       super().__init__(**_snake_case		)

       lowerCamelCase_							:    Tuple							=     image_size
       lowerCamelCase_							:    Dict							=     patch_size
       lowerCamelCase_							:    str							=     num_channels
       lowerCamelCase_							:    Union[str, Any]							=     num_frames
       lowerCamelCase_							:    Union[str, Any]							=     tubelet_size

       lowerCamelCase_							:    List[Any]							=     hidden_size
       lowerCamelCase_							:    Any							=     num_hidden_layers
       lowerCamelCase_							:    Optional[Any]							=     num_attention_heads
       lowerCamelCase_							:    List[Any]							=     intermediate_size
       lowerCamelCase_							:    Tuple							=     hidden_act
       lowerCamelCase_							:    List[str]							=     hidden_dropout_prob
       lowerCamelCase_							:    Optional[int]							=     attention_probs_dropout_prob
       lowerCamelCase_							:    Dict							=     initializer_range
       lowerCamelCase_							:    List[Any]							=     layer_norm_eps
       lowerCamelCase_							:    Union[str, Any]							=     qkv_bias
       lowerCamelCase_							:    str							=     use_mean_pooling

       lowerCamelCase_							:    List[Any]							=     decoder_num_attention_heads
       lowerCamelCase_							:    Optional[int]							=     decoder_hidden_size
       lowerCamelCase_							:    Optional[Any]							=     decoder_num_hidden_layers
       lowerCamelCase_							:    List[Any]							=     decoder_intermediate_size
       lowerCamelCase_							:    List[str]							=     norm_pix_loss








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()
