


'''simple docstring'''



def   lowerCamelCase							(_SCREAMING_SNAKE_CASE      :   list[list[int]]						,      _SCREAMING_SNAKE_CASE      :   int						,      _SCREAMING_SNAKE_CASE      :   int						,      _SCREAMING_SNAKE_CASE      :   set   ):
					__a    ,				__a			:       Optional[Any]					    =  len(_SCREAMING_SNAKE_CASE   ), len(grid[0]   )
					if (
					    min(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   ) < 0
					    or row == row_length
					    or col == col_length
					    or (row, col) in visit
					    or grid[row][col] == 1
					):
										return 0
					if row == row_length - 1 and col == col_length - 1:
										return 1

					visit.add((row, col)   )

					__a			:       Dict					    =  0
					count += depth_first_search(_SCREAMING_SNAKE_CASE						,      row + 1						,      _SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   )
					count += depth_first_search(_SCREAMING_SNAKE_CASE						,      row - 1						,      _SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   )
					count += depth_first_search(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE						,      col + 1						,      _SCREAMING_SNAKE_CASE   )
					count += depth_first_search(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE						,      col - 1						,      _SCREAMING_SNAKE_CASE   )

					visit.remove((row, col)   )
					return count


if __name__ == "__main__":
	import doctest

	doctest.testmod()




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


UpperCamelCase  							=						{}

try:
      if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase  							=						['''GPTSw3Tokenizer''']


if TYPE_CHECKING:
      try:
            if not is_sentencepiece_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_gpt_swa import GPTSwaTokenizer

else:
      import sys

      UpperCamelCase  							=						_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



