


'''simple docstring'''






class 						a__							:





							'''simple docstring'''






							def __init__(						self   ,       lowerCamelCase_  )			->				List[str]:
														lowerCAmelCase__			  =      n
														lowerCAmelCase__			  =      [None] * self.n
														lowerCAmelCase__			  =      0  # index of the first element
														lowerCAmelCase__			  =      0
														lowerCAmelCase__			  =      0







							def __len__(						self  )			->				int:
														return self.size







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				bool:
														return self.size == 0







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				Tuple:
														return False if self.is_empty() else self.array[self.front]







							def     __SCREAMING_SNAKE_CASE				(						self   ,       lowerCamelCase_  )			->				Optional[int]:
														if self.size >= self.n:
																					raise Exception('''QUEUE IS FULL'''  )

														lowerCAmelCase__			  =      data
														lowerCAmelCase__			  =      (self.rear + 1) % self.n
														self.size += 1
														return self







							def     __SCREAMING_SNAKE_CASE				(						self  )			->				List[str]:
														if self.size == 0:
																					raise Exception('''UNDERFLOW'''  )

														lowerCAmelCase__			  =      self.array[self.front]
														lowerCAmelCase__			  =      None
														lowerCAmelCase__			  =      (self.front + 1) % self.n
														self.size -= 1
														return temp

"""simple docstring"""


import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline






@pytest.mark.integration
def    _snake_case					(		):
	with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT  ):
		with pytest.raises(snake_case__  ):
			requests.request('GET'						,   'https://huggingface.co'  )
		with pytest.raises(requests.exceptions.ConnectTimeout  ):
			requests.request('GET'						,   'https://huggingface.co'						,   timeout=1.0  )






@pytest.mark.integration
def    _snake_case					(		):
	with offline(OfflineSimulationMode.CONNECTION_FAILS  ):
		with pytest.raises(requests.exceptions.ConnectionError  ):
			requests.request('GET'						,   'https://huggingface.co'  )






def    _snake_case					(		):
	with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1  ):
		with pytest.raises(snake_case__  ):
			http_head('https://huggingface.co'  )