



"""simple docstring"""
from .pipeline_kandinskya_a import KandinskyVaaPipeline
from .pipeline_kandinsky2_2_controlnet import KandinskyVaaControlnetPipeline
from .pipeline_kandinsky2_2_controlnet_img2img import KandinskyVaaControlnetImgaImgPipeline
from .pipeline_kandinsky2_2_img2img import KandinskyVaaImgaImgPipeline
from .pipeline_kandinsky2_2_inpainting import KandinskyVaaInpaintPipeline
from .pipeline_kandinsky2_2_prior import KandinskyVaaPriorPipeline
from .pipeline_kandinsky2_2_prior_emb2emb import KandinskyVaaPriorEmbaEmbPipeline








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