
def 	UpperCamelCase__  (     SCREAMING_SNAKE_CASE_	:	list[list[int]]		,   SCREAMING_SNAKE_CASE_	:	int		,   SCREAMING_SNAKE_CASE_	:	int		,   SCREAMING_SNAKE_CASE_	:	set       )  ->     int:
						_lowercase       ,						_lowercase					       =					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)       )

						_lowercase					       =					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_torch_available


A		: Dict								=     {
    '''configuration_x_clip''': [
        '''XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''XCLIPConfig''',
        '''XCLIPTextConfig''',
        '''XCLIPVisionConfig''',
    ],
    '''processing_x_clip''': ['''XCLIPProcessor'''],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A		: Optional[Any]								=     [
		    '''XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''XCLIPModel''',
		    '''XCLIPPreTrainedModel''',
		    '''XCLIPTextModel''',
		    '''XCLIPVisionModel''',
		]

if TYPE_CHECKING:
		from .configuration_x_clip import (
		    XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    XCLIPConfig,
		    XCLIPTextConfig,
		    XCLIPVisionConfig,
		)
		from .processing_x_clip import XCLIPProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_x_clip import (
				    XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
				    XCLIPModel,
				    XCLIPPreTrainedModel,
				    XCLIPTextModel,
				    XCLIPVisionModel,
				)

else:
		import sys

		A		: List[str]								=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)