





def       SCREAMING_SNAKE_CASE__  (       _lowercase     : list[list[int]]   ,    _lowercase     : int   ,    _lowercase     : int   ,    _lowercase     : set			)   ->							int:




		'''simple docstring'''
		lowercase__   ,				lowercase__					:      Tuple      =		len(_lowercase			), len(grid[0]			)
		if (
		    min(_lowercase   ,    _lowercase			) < 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)			)

		lowercase__					:      int      =		0
		count += depth_first_search(_lowercase   ,    row + 1   ,    _lowercase   ,    _lowercase			)
		count += depth_first_search(_lowercase   ,    row - 1   ,    _lowercase   ,    _lowercase			)
		count += depth_first_search(_lowercase   ,    _lowercase   ,    col + 1   ,    _lowercase			)
		count += depth_first_search(_lowercase   ,    _lowercase   ,    col - 1   ,    _lowercase			)

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


if __name__ == "__main__":
			import doctest

			doctest.testmod()









import enum
import shutil
import sys


__UpperCamelCase,	__UpperCamelCase:	Optional[int] = shutil.get_terminal_size()

__UpperCamelCase:	Optional[Any] = {"""UP""": """A""", """DOWN""": """B""", """RIGHT""": """C""", """LEFT""": """D"""}


class       __lowerCAmelCase					(       enum.Enum      ):


	'''simple docstring'''





	_A													=				0
	_A													=				1


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : List[Any]   ,    _lowercase     : Union[str, Any]=""			)   ->							int:




		'''simple docstring'''
		sys.stdout.write(str(_lowercase			) + end			)
		sys.stdout.flush()


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : Optional[Any]   ,    _lowercase     : Union[str, Any]   ,    _lowercase     : Optional[int]=""			)   ->							str:




		'''simple docstring'''
		forceWrite(f"""\u001b[{color}m{content}\u001b[0m"""   ,    _lowercase			)


def       SCREAMING_SNAKE_CASE__  (       )   ->							int:




		'''simple docstring'''
		forceWrite('\r'			)


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : int   ,    _lowercase     : str			)   ->							List[Any]:




		'''simple docstring'''
		forceWrite(f"""\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}"""			)


def       SCREAMING_SNAKE_CASE__  (       )   ->							Dict:




		'''simple docstring'''
		forceWrite(' ' * TERMINAL_WIDTH			)
		reset_cursor()





def       SCREAMING_SNAKE_CASE__  (       )   ->							List[str]:




		'''simple docstring'''
		reset_cursor()
		forceWrite('-' * TERMINAL_WIDTH			)


