




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_     :					int   ,				lowerCAmelCase_     :					int   ,				lowerCAmelCase_     :					int   ,				lowerCAmelCase_     :					int			):
     """simple docstring"""

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



def 							_A   (						lowerCAmelCase_     :					int   ,				lowerCAmelCase_     :					int   ,				lowerCAmelCase_     :					set   ,				lowerCAmelCase_     :					list[list[int]]			):
     """simple docstring"""

     lowerCAmelCase__		= len(lowerCAmelCase_			)
     lowerCAmelCase__		= 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_     :					list[list[int]]			):
     """simple docstring"""

     lowerCAmelCase__		= set()

     lowerCAmelCase__		= 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__		= 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()






import argparse

from transformers import CanineConfig, CanineModel, CanineTokenizer, load_tf_weights_in_canine
from transformers.utils import logging


logging.set_verbosity_info()



def 							_A   (						lowerCAmelCase_     :					Optional[Any]   ,				lowerCAmelCase_     :					Tuple			):
     """simple docstring"""

     lowerCAmelCase__		= CanineConfig()
     lowerCAmelCase__		= CanineModel(lowerCAmelCase_			)
     model.eval()

     print(F'Building PyTorch model from configuration: {config}'			)

     # Load weights from tf checkpoint
     load_tf_weights_in_canine(lowerCAmelCase_   ,				lowerCAmelCase_   ,				lowerCAmelCase_			)

     # Save pytorch-model (weights and configuration)
     print(F'Save PyTorch model to {pytorch_dump_path}'			)
     model.save_pretrained(lowerCAmelCase_			)

     # Save tokenizer files
     lowerCAmelCase__		= CanineTokenizer()
     print(F'Save tokenizer files to {pytorch_dump_path}'			)
     tokenizer.save_pretrained(lowerCAmelCase_			)


if __name__ == "__main__":
     UpperCamelCase								=     argparse.ArgumentParser()
     # Required parameters
     parser.add_argument(
         '--tf_checkpoint_path',
         default=None,
         type=str,
         required=True,
         help='Path to the TensorFlow checkpoint. Should end with model.ckpt',
     )
     parser.add_argument(
         '--pytorch_dump_path',
         default=None,
         type=str,
         required=True,
         help='Path to a folder where the PyTorch model will be placed.',
     )
     UpperCamelCase								=     parser.parse_args()
     convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.pytorch_dump_path)
