'''simple docstring'''




import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible





class     __magic_name__						(    unittest.TestCase):







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Union[str, Any]    ):
										lowercase_					:			Tuple										=       [
										    """safety_checker/pytorch_model.bin""",
										    """safety_checker/model.safetensors""",
										    """vae/diffusion_pytorch_model.bin""",
										    """vae/diffusion_pytorch_model.safetensors""",
										    """text_encoder/pytorch_model.bin""",
										    """text_encoder/model.safetensors""",
										    """unet/diffusion_pytorch_model.bin""",
										    """unet/diffusion_pytorch_model.safetensors""",
										]
										self.assertTrue(is_safetensors_compatible(lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  int    ):
										lowercase_					:			Optional[Any]										=       [
										    """unet/diffusion_pytorch_model.bin""",
										    """unet/diffusion_pytorch_model.safetensors""",
										]
										self.assertTrue(is_safetensors_compatible(lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Any    ):
										lowercase_					:			Any										=       [
										    """safety_checker/pytorch_model.bin""",
										    """safety_checker/model.safetensors""",
										    """vae/diffusion_pytorch_model.bin""",
										    """vae/diffusion_pytorch_model.safetensors""",
										    """text_encoder/pytorch_model.bin""",
										    """text_encoder/model.safetensors""",
										    """unet/diffusion_pytorch_model.bin""",
										    # Removed: 'unet/diffusion_pytorch_model.safetensors',
										]
										self.assertFalse(is_safetensors_compatible(lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[Any]    ):
										lowercase_					:			Optional[Any]										=       [
										    """text_encoder/pytorch_model.bin""",
										    """text_encoder/model.safetensors""",
										]
										self.assertTrue(is_safetensors_compatible(lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[str]    ):
										lowercase_					:			List[Any]										=       [
										    """safety_checker/pytorch_model.bin""",
										    """safety_checker/model.safetensors""",
										    """vae/diffusion_pytorch_model.bin""",
										    """vae/diffusion_pytorch_model.safetensors""",
										    """text_encoder/pytorch_model.bin""",
										    # Removed: 'text_encoder/model.safetensors',
										    """unet/diffusion_pytorch_model.bin""",
										    """unet/diffusion_pytorch_model.safetensors""",
										]
										self.assertFalse(is_safetensors_compatible(lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Any    ):
										lowercase_					:			Any										=       [
										    """safety_checker/pytorch_model.fp16.bin""",
										    """safety_checker/model.fp16.safetensors""",
										    """vae/diffusion_pytorch_model.fp16.bin""",
										    """vae/diffusion_pytorch_model.fp16.safetensors""",
										    """text_encoder/pytorch_model.fp16.bin""",
										    """text_encoder/model.fp16.safetensors""",
										    """unet/diffusion_pytorch_model.fp16.bin""",
										    """unet/diffusion_pytorch_model.fp16.safetensors""",
										]
										lowercase_					:			Tuple										=       """fp16"""
										self.assertTrue(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  int    ):
										lowercase_					:			str										=       [
										    """unet/diffusion_pytorch_model.fp16.bin""",
										    """unet/diffusion_pytorch_model.fp16.safetensors""",
										]
										lowercase_					:			Any										=       """fp16"""
										self.assertTrue(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  Dict    ):
										# pass variant but use the non-variant filenames
										lowercase_					:			Union[str, Any]										=       [
										    """unet/diffusion_pytorch_model.bin""",
										    """unet/diffusion_pytorch_model.safetensors""",
										]
										lowercase_					:			Tuple										=       """fp16"""
										self.assertTrue(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  int    ):
										lowercase_					:			List[Any]										=       [
										    """safety_checker/pytorch_model.fp16.bin""",
										    """safety_checker/model.fp16.safetensors""",
										    """vae/diffusion_pytorch_model.fp16.bin""",
										    """vae/diffusion_pytorch_model.fp16.safetensors""",
										    """text_encoder/pytorch_model.fp16.bin""",
										    """text_encoder/model.fp16.safetensors""",
										    """unet/diffusion_pytorch_model.fp16.bin""",
										    # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
										]
										lowercase_					:			str										=       """fp16"""
										self.assertFalse(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  int    ):
										lowercase_					:			int										=       [
										    """text_encoder/pytorch_model.fp16.bin""",
										    """text_encoder/model.fp16.safetensors""",
										]
										lowercase_					:			Union[str, Any]										=       """fp16"""
										self.assertTrue(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  List[str]    ):
										# pass variant but use the non-variant filenames
										lowercase_					:			str										=       [
										    """text_encoder/pytorch_model.bin""",
										    """text_encoder/model.safetensors""",
										]
										lowercase_					:			Optional[int]										=       """fp16"""
										self.assertTrue(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )







			def 	SCREAMING_SNAKE_CASE_     (	self				:  str    ):
										lowercase_					:			Dict										=       [
										    """safety_checker/pytorch_model.fp16.bin""",
										    """safety_checker/model.fp16.safetensors""",
										    """vae/diffusion_pytorch_model.fp16.bin""",
										    """vae/diffusion_pytorch_model.fp16.safetensors""",
										    """text_encoder/pytorch_model.fp16.bin""",
										    # 'text_encoder/model.fp16.safetensors',
										    """unet/diffusion_pytorch_model.fp16.bin""",
										    """unet/diffusion_pytorch_model.fp16.safetensors""",
										]
										lowercase_					:			Optional[int]										=       """fp16"""
										self.assertFalse(is_safetensors_compatible(lowercase__				,			variant=lowercase__    )    )








'''simple docstring'''






from __future__ import annotations


def 		_A     (    A__      ):






 """simple docstring"""



 __lowercase							  = len(A__      )
 # We need to create solution object to save path.
 __lowercase							  = [[0 for _ in range(A__      )] for _ in range(A__      )]
 __lowercase							  = run_maze(A__     ,				0     ,				0     ,				A__      )
 if solved:
  print('''\n'''.join(str(A__      ) for row in solutions      )      )
 else:
  print('''No solution exists!'''      )
 return solved


def 		_A     (    A__     ,				A__     ,				A__     ,				A__      ):






 """simple docstring"""



 __lowercase							  = len(A__      )
 # Final check point.
 if i == j == (size - 1):
  __lowercase							  = 1
  return True

 __lowercase							  = (not i < 0) and (not j < 0)  # Check lower bounds
 __lowercase							  = (i < size) and (j < size)  # Check upper bounds

 if lower_flag and upper_flag:
  # check for already visited and block points.
  __lowercase							  = (not solutions[i][j]) and (not maze[i][j])
  if block_flag:
   # check visited
   __lowercase							  = 1

   # check for directions
   if (
       run_maze(A__     ,				i + 1     ,				A__     ,				A__      )
       or run_maze(A__     ,				A__     ,				j + 1     ,				A__      )
       or run_maze(A__     ,				i - 1     ,				A__     ,				A__      )
       or run_maze(A__     ,				A__     ,				j - 1     ,				A__      )
   ):
    return True

   __lowercase							  = 0
   return False
 return False


if __name__ == "__main__":
 import doctest

 doctest.testmod()

