



"""simple docstring"""







def     UpperCamelCase_   (   lowerCAmelCase__				:    list[list[int]]   ,       lowerCAmelCase__				:    int   ,       lowerCAmelCase__				:    int   ,       lowerCAmelCase__				:    set						)						->       int:

  """simple docstring"""




  lowerCAmelCase_       :    Tuple								=			len(lowerCAmelCase__						), len(grid[0]						)
  if (
      min(lowerCAmelCase__   ,       lowerCAmelCase__						) < 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)						)

  lowerCAmelCase_       :    Dict								=			0
  count += depth_first_search(lowerCAmelCase__   ,       row + 1   ,       lowerCAmelCase__   ,       lowerCAmelCase__						)
  count += depth_first_search(lowerCAmelCase__   ,       row - 1   ,       lowerCAmelCase__   ,       lowerCAmelCase__						)
  count += depth_first_search(lowerCAmelCase__   ,       lowerCAmelCase__   ,       col + 1   ,       lowerCAmelCase__						)
  count += depth_first_search(lowerCAmelCase__   ,       lowerCAmelCase__   ,       col - 1   ,       lowerCAmelCase__						)

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


if __name__ == "__main__":
      import doctest

      doctest.testmod()










"""simple docstring"""







import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


lowercase__		:    int				   =     HUGGINGFACE_HUB_CACHE


lowercase__		:    Tuple				   =     """config.json"""
lowercase__		:    Union[str, Any]				   =     """diffusion_pytorch_model.bin"""
lowercase__		:    List[Any]				   =     """diffusion_flax_model.msgpack"""
lowercase__		:    List[str]				   =     """model.onnx"""
lowercase__		:    List[Any]				   =     """diffusion_pytorch_model.safetensors"""
lowercase__		:    Dict				   =     """weights.pb"""
lowercase__		:    List[Any]				   =     """https://huggingface.co"""
lowercase__		:    List[Any]				   =     default_cache_path
lowercase__		:    Tuple				   =     """diffusers_modules"""
lowercase__		:    Tuple				   =     os.getenv("""HF_MODULES_CACHE""", os.path.join(hf_cache_home, """modules"""))
lowercase__		:    List[str]				   =     ["""fp16""", """non-ema"""]
lowercase__		:    Optional[Any]				   =     """.self_attn"""





