




"""simple docstring"""






from __future__ import annotations

from typing import Any




class   a__			:





						def __init__(							self      :	List[str]     ,a__      :	Any = 6)						->       Dict:




											"""simple docstring"""







											_lowerCAmelCase:List[str]									=  None
											_lowerCAmelCase:List[Any]									=  None
											self.create_linked_list(__lowerCAmelCase)





						def       __UpperCamelCase     (							self      :	Any     ,a__      :	Tuple)						->       List[Any]:




											"""simple docstring"""







											_lowerCAmelCase:Dict									=  Node()
											_lowerCAmelCase:Union[str, Any]									=  current_node
											_lowerCAmelCase:str									=  current_node
											_lowerCAmelCase:Dict									=  current_node
											for _ in range(1     ,__lowerCAmelCase):
																_lowerCAmelCase:Any									=  Node()
																_lowerCAmelCase:Optional[int]									=  current_node
																_lowerCAmelCase:Optional[Any]									=  previous_node
																_lowerCAmelCase:Any									=  current_node
											_lowerCAmelCase:Union[str, Any]									=  self.front
											_lowerCAmelCase:str									=  previous_node





						def       __UpperCamelCase     (							self      :	Union[str, Any])						->       Optional[int]:




											"""simple docstring"""







											return (
											    self.front == self.rear
											    and self.front is not None
											    and self.front.data is None
											)





						def       __UpperCamelCase     (							self      :	Dict)						->       List[Any]:




											"""simple docstring"""







											self.check_can_perform_operation()
											return self.front.data if self.front else None





						def       __UpperCamelCase     (							self      :	Union[str, Any]     ,a__      :	int)						->       Any:




											"""simple docstring"""







											if self.rear is None:
																return

											self.check_is_full()
											if not self.is_empty():
																_lowerCAmelCase:str									=  self.rear.next
											if self.rear:
																_lowerCAmelCase:List[Any]									=  data





						def       __UpperCamelCase     (							self      :	List[Any])						->       int:




											"""simple docstring"""







											self.check_can_perform_operation()
											if self.rear is None or self.front is None:
																return None
											if self.front == self.rear:
																_lowerCAmelCase:int									=  self.front.data
																_lowerCAmelCase:Dict									=  None
																return data

											_lowerCAmelCase:Dict									=  self.front
											_lowerCAmelCase:Union[str, Any]									=  old_front.next
											_lowerCAmelCase:Union[str, Any]									=  old_front.data
											_lowerCAmelCase:Optional[Any]									=  None
											return data





						def       __UpperCamelCase     (							self      :	int)						->       List[str]:




											"""simple docstring"""







											if self.is_empty():
																raise Exception('''Empty Queue''')







						def       __UpperCamelCase     (							self      :	List[Any])						->       int:




											"""simple docstring"""







											if self.rear and self.rear.next == self.front:
																raise Exception('''Full Queue''')




class   a__			:





						def __init__(							self      :	Tuple)						->       Dict:




											"""simple docstring"""







											_lowerCAmelCase:List[Any]									=  None
											_lowerCAmelCase:List[str]									=  None
											_lowerCAmelCase:Optional[int]									=  None


if __name__ == "__main__":
				import doctest

				doctest.testmod()






"""simple docstring"""






from argparse import ArgumentParser

from .add_new_model import AddNewModelCommand
from .add_new_model_like import AddNewModelLikeCommand
from .convert import ConvertCommand
from .download import DownloadCommand
from .env import EnvironmentCommand
from .lfs import LfsCommands
from .pt_to_tf import PTtoTFCommand
from .run import RunCommand
from .serving import ServeCommand
from .user import UserCommands





def 							UpperCAmelCase		(		):
					_lowerCAmelCase:List[Any]									=  ArgumentParser('''Transformers CLI tool'''      ,       usage='''transformers-cli <command> [<args>]'''    )
					_lowerCAmelCase:Union[str, Any]									=  parser.add_subparsers(help='''transformers-cli command helpers'''    )

					# Register commands
					ConvertCommand.register_subcommand(snake_case    )
					DownloadCommand.register_subcommand(snake_case    )
					EnvironmentCommand.register_subcommand(snake_case    )
					RunCommand.register_subcommand(snake_case    )
					ServeCommand.register_subcommand(snake_case    )
					UserCommands.register_subcommand(snake_case    )
					AddNewModelCommand.register_subcommand(snake_case    )
					AddNewModelLikeCommand.register_subcommand(snake_case    )
					LfsCommands.register_subcommand(snake_case    )
					PTtoTFCommand.register_subcommand(snake_case    )

					# Let's go
					_lowerCAmelCase:Union[str, Any]									=  parser.parse_args()

					if not hasattr(snake_case      ,       '''func'''    ):
										parser.print_help()
										exit(1    )

					# Run
					_lowerCAmelCase:Any									=  args.func(snake_case    )
					service.run()


if __name__ == "__main__":
				main()






