code: 
  from transformers import (
      DPRContextEncoderTokenizer,
      DPRContextEncoderTokenizerFast,
      DPRQuestionEncoderTokenizer,
      DPRQuestionEncoderTokenizerFast,
      DPRReaderOutput,
      DPRReaderTokenizer,
      DPRReaderTokenizerFast,
  )
  from transformers.testing_utils import require_tokenizers, slow
  from transformers.tokenization_utils_base import BatchEncoding
  
  from ..bert.test_tokenization_bert import BertTokenizationTest
  
  
  
  
  @require_tokenizers
  class 					_UpperCamelCase (      lowerCamelCase__	):
  
  
  
  
  
  
  
  							'''simple docstring'''
  							_A  				=  DPRContextEncoderTokenizer
  							_A  				=  DPRContextEncoderTokenizerFast
  							_A  				=  True
  
  
  
  
  @require_tokenizers
  class 					_UpperCamelCase (      lowerCamelCase__	):
  
  
  
  
  
  
  
  							'''simple docstring'''
  							_A  				=  DPRQuestionEncoderTokenizer
  							_A  				=  DPRQuestionEncoderTokenizerFast
  							_A  				=  True
  
  
  
  
  @require_tokenizers
  class 					_UpperCamelCase (      lowerCamelCase__	):
  
  
  
  
  
  
  
  							'''simple docstring'''
  							_A  				=  DPRReaderTokenizer
  							_A  				=  DPRReaderTokenizerFast
  							_A  				=  True
  
  
  
  
  
  
  
  							@slow
  							def 		_UpperCAmelCase	(		self  :				Optional[int]		):
  													_a     =			self.tokenizer_class.from_pretrained('bert-base-uncased'		)
  
  													_a     =			tokenizer.encode('question sequence'		,				add_special_tokens=SCREAMING_SNAKE_CASE_		)
  													_a     =			tokenizer.encode('title sequence'		,				add_special_tokens=SCREAMING_SNAKE_CASE_		)
  													_a     =			tokenizer.encode('text sequence ' * 4		,				add_special_tokens=SCREAMING_SNAKE_CASE_		)
  													_a     =			[[1_0_1] + text_a + [1_0_2] + text_a + [1_0_2] + text_a]
  													_a     =			BatchEncoding({'input_ids': input_ids}		)
  
  													_a     =			[[0] * len(input_ids[0]		)]
  													_a     =			[[0] * len(input_ids[0]		)]
  													_a     =			[0]
  													_a     =			DPRReaderOutput(SCREAMING_SNAKE_CASE_		,				SCREAMING_SNAKE_CASE_		,				SCREAMING_SNAKE_CASE_		)
  
  													_a ,	_a     =			8, 9
  													_a     =			1_0
  													_a     =			1_0
  													_a     =			tokenizer.decode_best_spans(SCREAMING_SNAKE_CASE_		,				SCREAMING_SNAKE_CASE_		)
  													self.assertEqual(predicted_spans[0].start_index		,				SCREAMING_SNAKE_CASE_		)
  													self.assertEqual(predicted_spans[0].end_index		,				SCREAMING_SNAKE_CASE_		)
  													self.assertEqual(predicted_spans[0].doc_id		,				0		)
  
  
  
  
  
  
  
  							@slow
  							def 		_UpperCAmelCase	(		self  :				Union[str, Any]		):
  													_a     =			self.tokenizer_class.from_pretrained('bert-base-uncased'		)
  
  													_a     =			tokenizer.encode('question sequence'		,				add_special_tokens=SCREAMING_SNAKE_CASE_		)
  													_a     =			tokenizer.encode('title sequence'		,				add_special_tokens=SCREAMING_SNAKE_CASE_		)
  													_a     =			tokenizer.encode('text sequence'		,				add_special_tokens=SCREAMING_SNAKE_CASE_		)
  													_a     =			[1_0_1] + text_a + [1_0_2] + text_a + [1_0_2] + text_a
  													_a     =			tokenizer(questions=['question sequence']		,				titles=['title sequence']		,				texts=['text sequence']		)
  													self.assertIn('input_ids'		,				SCREAMING_SNAKE_CASE_		)
  													self.assertIn('attention_mask'		,				SCREAMING_SNAKE_CASE_		)
  													self.assertListEqual(encoded_input['input_ids'][0]		,				SCREAMING_SNAKE_CASE_		)
  
  
  
style_context: 
  
  
  def 							SCREAMING_SNAKE_CASE					(  _UpperCAmelCase				)    ->  bool:
  						# must be
  						_a     =			[list(_UpperCAmelCase				) for row in matrix]
  						if matrix and isinstance(_UpperCAmelCase							,     _UpperCAmelCase				):
  												if isinstance(matrix[0]							,     _UpperCAmelCase				):
  																		_a     =			0
  																		for row in matrix:
  																								if prev_len == 0:
  																														_a     =			len(_UpperCAmelCase				)
  																														_a     =			True
  																								else:
  																														_a     =			prev_len == len(_UpperCAmelCase				)
  												else:
  																		_a     =			True
  						else:
  												_a     =			False
  
  						return result
  
  
  def 							SCREAMING_SNAKE_CASE					(  _UpperCAmelCase				)    ->  None:
  						if check_matrix(_UpperCAmelCase				) and len(_UpperCAmelCase				) > 0:
  												_a     =			[list(_UpperCAmelCase				) for row in a]
  												_a     =			len(_UpperCAmelCase				)
  												if isinstance(a[0]							,     _UpperCAmelCase				):
  																		_a     =			len(a[0]				)
  												else:
  																		for dat in a:
  																								print(_UpperCAmelCase				)
  																		return
  
  												# horizotal printing increasing
  												for i in range(0							,     _UpperCAmelCase				):
  																		print(a[0][i]				)
  												# vertical printing down
  												for i in range(1							,     _UpperCAmelCase				):
  																		print(a[i][mat_col - 1]				)
  												# horizotal printing decreasing
  												if mat_row > 1:
  																		for i in range(mat_col - 2							,     -1							,     -1				):
  																								print(a[mat_row - 1][i]				)
          # vertical printing up
  												for i in range(mat_row - 2							,     0							,     -1				):
  																		print(a[i][0]				)
  												_a     =			[row[1 : mat_col - 1] for row in a[1 : mat_row - 1]]
  												if len(_UpperCAmelCase				) > 0:
  																		spiral_print_clockwise(_UpperCAmelCase				)
  												else:
  																		return
  						else:
  												print('Not a valid matrix'				)
  												return
  
  
  def 							SCREAMING_SNAKE_CASE					(  _UpperCAmelCase				)    ->  list[int]:
  						if matrix:
  												return list(matrix.pop(0				)				) + spiral_traversal(list(zip(*_UpperCAmelCase				)				)[::-1]				)
  						else:
  												return []
  
  
  # driver code
  if __name__ == "__main__":
  		import doctest
  
  		doctest.testmod()
  
  		lowercase_								=    [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]
  		spiral_print_clockwise(a)
  
  
  