




lowercase_			:       Optional[int]	       =				[
    [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 							__SCREAMING_SNAKE_CASE						(    snake_case_			,					snake_case_			,					snake_case_			,					snake_case_		):

						'''simple docstring'''


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


def 							__SCREAMING_SNAKE_CASE						(    snake_case_			,					snake_case_			,					snake_case_			,					snake_case_		):

						'''simple docstring'''


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


def 							__SCREAMING_SNAKE_CASE						(    snake_case_		):

						'''simple docstring'''


						_UpperCAmelCase									=  set()

						_UpperCAmelCase									=  0
						for row, line in enumerate(snake_case_		):
												for col, item in enumerate(snake_case_		):
																		if item == 1 and (row, col) not in seen:
																								# Maximizing the area
																								_UpperCAmelCase									=  max(snake_case_			,					depth_first_search(snake_case_			,					snake_case_			,					snake_case_			,					snake_case_		)		)
						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_torch_available,
)


lowercase_			:       List[str]						       =				{
    'configuration_rwkv': ['RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP', 'RwkvConfig', 'RwkvOnnxConfig'],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase_			:       Any						       =				[
				    'RWKV_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'RwkvForCausalLM',
				    'RwkvModel',
				    'RwkvPreTrainedModel',
				]


if TYPE_CHECKING:
				from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_rwkv import (
								    RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
								    RwkvForCausalLM,
								    RwkvModel,
								    RwkvPreTrainedModel,
								)
else:
				import sys

				lowercase_			:       Union[str, Any]						       =				_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




