code: def 	UpperCamelCase			(     snake_case__ :					int ,  snake_case__ :					int ,  snake_case__ :					int ,  snake_case__ :					int			)			->  Tuple:
     return len_board * len_board_column * row + column
  def 	UpperCamelCase			(     snake_case__ :					list[list[str]] ,  snake_case__ :					str ,  snake_case__ :					int ,  snake_case__ :					int ,  snake_case__ :					int ,  snake_case__ :					set[int] ,  )			->  Union[str, Any]:
  
     if board[row][column] != word[word_index]:
        return False
  
     if word_index == len(lowercase_			) - 1:
        return True
  
     UpperCamelCase					:						List[Any]					=			[(0, 1), (0, -1), (-1, 0), (1, 0)]
     UpperCamelCase					:						List[Any]					=			len(lowercase_			)
     UpperCamelCase					:						Union[str, Any]					=			len(board[0]			)
     for direction in traverts_directions:
        UpperCamelCase					:						Optional[Any]					=			row + direction[0]
        UpperCamelCase					:						Union[str, Any]					=			column + direction[1]
        if not (0 <= next_i < len_board and 0 <= next_j < len_board_column):
           continue
  
        UpperCamelCase					:						int					=			get_point_key(lowercase_ ,  lowercase_ ,  lowercase_ ,  lowercase_			)
        if key in visited_points_set:
           continue
  
        visited_points_set.add(lowercase_			)
        if exits_word(lowercase_ ,  lowercase_ ,  lowercase_ ,  lowercase_ ,  word_index + 1 ,  lowercase_			):
           return True
  
        visited_points_set.remove(lowercase_			)
  
     return False
  def 	UpperCamelCase			(     snake_case__ :					list[list[str]] ,  snake_case__ :					str			)			->  Tuple:
     UpperCamelCase					:						Dict					=			(
         'The board should be a non empty matrix of single chars strings.'
     )
  
     UpperCamelCase					:						int					=			len(lowercase_			)
     if not isinstance(lowercase_ ,  lowercase_			) or len(lowercase_			) == 0:
        raise ValueError(lowercase_			)
  
     for row in board:
        if not isinstance(lowercase_ ,  lowercase_			) or len(lowercase_			) == 0:
           raise ValueError(lowercase_			)
  
        for item in row:
           if not isinstance(lowercase_ ,  lowercase_			) or len(lowercase_			) != 1:
              raise ValueError(lowercase_			)
  
      # Validate word
     if not isinstance(lowercase_ ,  lowercase_			) or len(lowercase_			) == 0:
        raise ValueError(
            'The word parameter should be a string of length greater than 0.'			)
  
     UpperCamelCase					:						Any					=			len(board[0]			)
     for i in range(lowercase_			):
        for j in range(lowercase_			):
           if exits_word(
               lowercase_ ,  lowercase_ ,  lowercase_ ,  lowercase_ ,  0 ,  {get_point_key(lowercase_ ,  lowercase_ ,  lowercase_ ,  lowercase_			)}			):
              return True
  
     return False
  
  
  if __name__ == "__main__":
      import doctest
  
      doctest.testmod()
  
  
  
  
style_context: 
  
  
  
  from typing import Optional, Tuple
  
  from ...tokenization_utils_fast import PreTrainedTokenizerFast
  from ...utils import logging
  from .tokenization_openai import OpenAIGPTTokenizer
  
  
  __UpperCAmelCase      = logging.get_logger(__name__)
  
  __UpperCAmelCase      = {'''vocab_file''': '''vocab.json''', '''merges_file''': '''merges.txt''', '''tokenizer_file''': '''tokenizer.json'''}
  
  __UpperCAmelCase      = {
      '''vocab_file''': {'''openai-gpt''': '''https://huggingface.co/openai-gpt/resolve/main/vocab.json'''},
      '''merges_file''': {'''openai-gpt''': '''https://huggingface.co/openai-gpt/resolve/main/merges.txt'''},
      '''tokenizer_file''': {'''openai-gpt''': '''https://huggingface.co/openai-gpt/resolve/main/tokenizer.json'''},
  }
  
  __UpperCAmelCase      = {
      '''openai-gpt''': 512,
  }
  
  
  
  class        lowerCAmelCase_	(						a__							):
         UpperCAmelCase__       :      Union[str, Any]       =						VOCAB_FILES_NAMES
         UpperCAmelCase__       :      int       =						PRETRAINED_VOCAB_FILES_MAP
         UpperCAmelCase__       :      Optional[int]       =						PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
         UpperCAmelCase__       :      Optional[int]       =						["input_ids", "attention_mask"]
         UpperCAmelCase__       :      Tuple       =						OpenAIGPTTokenizer
         def __init__(    self,    SCREAMING_SNAKE_CASE_=None,    SCREAMING_SNAKE_CASE_=None,    SCREAMING_SNAKE_CASE_=None,    SCREAMING_SNAKE_CASE_="<unk>",    **SCREAMING_SNAKE_CASE_ )  ->	List[str]:
            super().__init__(SCREAMING_SNAKE_CASE_,    SCREAMING_SNAKE_CASE_,    tokenizer_file=SCREAMING_SNAKE_CASE_,    unk_token=SCREAMING_SNAKE_CASE_,    **SCREAMING_SNAKE_CASE_ )
         @property
         def       snake_case_ (    self )  ->	Dict:
            return True
  
  
  
  
  
  
         def       snake_case_ (    self,    SCREAMING_SNAKE_CASE_,    SCREAMING_SNAKE_CASE_ = None )  ->	Tuple[str]:
            UpperCamelCase					:						List[Any]					=			self._tokenizer.model.save(SCREAMING_SNAKE_CASE_,    name=SCREAMING_SNAKE_CASE_ )
            return tuple(SCREAMING_SNAKE_CASE_ )
  
  
  
  