from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
				if not (is_transformers_available() and is_torch_available() and is_transformers_version('>=', '4.25.0')):
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				from ...utils.dummy_torch_and_transformers_objects import UnCLIPImageVariationPipeline, UnCLIPPipeline
else:
				from .pipeline_unclip import UnCLIPPipeline
				from .pipeline_unclip_image_variation import UnCLIPImageVariationPipeline
				from .text_proj import UnCLIPTextProjModel











def      __A					(     _lowercase					,			_lowercase					,			_lowercase					,			_lowercase ):

					'''simple docstring'''







					_A							,_A								= 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) )

					_A								= 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()



