





"""simple docstring"""


a__       :  Dict       		=					[
    [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__      (	_UpperCAmelCase						,  _UpperCAmelCase						,  _UpperCAmelCase						,  _UpperCAmelCase						)     ->	int:

 '''simple docstring'''






 return 0 <= row < rows and 0 <= col < cols





def 				a__      (	_UpperCAmelCase						,  _UpperCAmelCase						,  _UpperCAmelCase						,  _UpperCAmelCase						)     ->	List[str]:

 '''simple docstring'''






 snake_case__     				=					len(_lowercase						)
 snake_case__     				=					len(mat[0]						)
 if is_safe(_lowercase						,  _lowercase						,  _lowercase						,  _lowercase						) and (row, col) not in seen and mat[row][col] == 1:
  seen.add((row, col)						)
  return (
      1
      + depth_first_search(row + 1						,  _lowercase						,  _lowercase						,  _lowercase						)
      + depth_first_search(row - 1						,  _lowercase						,  _lowercase						,  _lowercase						)
      + depth_first_search(_lowercase						,  col + 1						,  _lowercase						,  _lowercase						)
      + depth_first_search(_lowercase						,  col - 1						,  _lowercase						,  _lowercase						)
  )
 else:
  return 0





def 				a__      (	_UpperCAmelCase						)     ->	int:

 '''simple docstring'''






 snake_case__     				=					set()

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


if __name__ == "__main__":
   import doctest

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









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


lowerCamelCase					    =	{}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase					    =	['''MBart50Tokenizer''']

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase					    =	['''MBart50TokenizerFast''']


if TYPE_CHECKING:
   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_mbartaa import MBartaaTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_mbartaa_fast import MBartaaTokenizerFast

else:
   import sys

   lowerCamelCase					    =	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
