




'''simple docstring'''



UpperCAmelCase_				:     Any     			=						[
    [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 	_UpperCamelCase       (_lowerCamelCase							:   str      ,		_lowerCamelCase							:   List[Any]      ,		_lowerCamelCase							:   Any      ,		_lowerCamelCase							:   Any		)->      bool:




     '''simple docstring'''





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







def 	_UpperCamelCase       (_lowerCamelCase							:   str      ,		_lowerCamelCase							:   Any      ,		_lowerCamelCase							:   Optional[int]      ,		_lowerCamelCase							:   Dict		)->      int:




     '''simple docstring'''





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







def 	_UpperCamelCase       (_lowerCamelCase							:   Tuple		)->      int:




     '''simple docstring'''





     __snake_case			    =     set()

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


if __name__ == "__main__":
     import doctest

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











from .chunk_utils import chunk_layer
from .data_transforms import make_atomaa_masks
from .feats import atomaa_to_atomaa, frames_and_literature_positions_to_atomaa_pos, torsion_angles_to_frames
from .loss import compute_predicted_aligned_error, compute_tm
from .protein import Protein as OFProtein
from .protein import to_pdb
from .rigid_utils import Rigid, Rotation
from .tensor_utils import dict_multimap, flatten_final_dims, permute_final_dims





