


"""simple docstring"""







# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import doctest
import sys
import warnings
from os.path import abspath, dirname, join

import _pytest

from transformers.testing_utils import HfDoctestModule, HfDocTestParser


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
lowerCamelCase_   :   Union[str, Any]									=  abspath(join(dirname(__file__), """src"""))
sys.path.insert(1, git_repo_path)

# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action="""ignore""", category=FutureWarning)
def _A						(						lowercase		):







    """simple docstring"""
    config.addinivalue_line(
        '''markers'''       ,    '''is_pt_tf_cross_test: mark test to run only when PT and TF interactions are tested'''		)
    config.addinivalue_line(
        '''markers'''       ,    '''is_pt_flax_cross_test: mark test to run only when PT and FLAX interactions are tested'''		)
    config.addinivalue_line('''markers'''       ,    '''is_pipeline_test: mark test to run only when pipelines are tested'''		)
    config.addinivalue_line('''markers'''       ,    '''is_staging_test: mark test to run only in the staging environment'''		)
    config.addinivalue_line('''markers'''       ,    '''accelerate_tests: mark test that require accelerate'''		)
    config.addinivalue_line('''markers'''       ,    '''tool_tests: mark the tool tests that are run on their specific schedule'''		)
def _A						(						lowercase		):







    """simple docstring"""
    from transformers.testing_utils import pytest_addoption_shared

    pytest_addoption_shared(_UpperCAmelCase		)
def _A						(						lowercase		):







    """simple docstring"""
    from transformers.testing_utils import pytest_terminal_summary_main

    a 		=terminalreporter.config.getoption('''--make-reports'''		)
    if make_reports:
        pytest_terminal_summary_main(_UpperCAmelCase       ,    id=_UpperCAmelCase		)
def _A						(						lowercase       ,    lowercase		):







    """simple docstring"""





    if exitstatus == 5:
        a 		=0


# Doctest custom flag to ignore output.
lowerCamelCase_   :   Any									=  doctest.register_optionflag("""IGNORE_RESULT""")

lowerCamelCase_   :   Optional[int]									=  doctest.OutputChecker






class       __A				(       __UpperCamelCase			):






 """simple docstring"""




 def       SCREAMING_SNAKE_CASE							(		self ,    __A ,    __A ,    __A						)					->     List[str]:





     if IGNORE_RESULT & optionflags:
         return True
     return OutputChecker.check_output(self ,    a_ ,    a_ ,    a_						)

lowerCamelCase_   :   Dict									=  CustomOutputChecker
lowerCamelCase_   :   str									=  HfDoctestModule





lowerCamelCase_   :   Dict									=  HfDocTestParser




from __future__ import annotations

class 		UpperCAmelCase__			:




			'''simple docstring'''






			def __init__(   self							: Optional[Any]       ,       a_							: Optional[int]=None ):
					'''simple docstring'''





					__UpperCAmelCase    :     Optional[Any]													=	data
					__UpperCAmelCase    :     Any													=	None




			def __repr__(   self							: Tuple ):
					'''simple docstring'''





					__UpperCAmelCase    :     Dict													=	[]
					__UpperCAmelCase    :     Any													=	self
					while temp:
							string_rep.append(F'{temp.data}' )
							__UpperCAmelCase    :     Dict													=	temp.next
					return "->".join(a_ )

def        a						(      _UpperCAmelCase							:					list						):







		'''simple docstring'''





		if not elements_list:
				raise Exception('''The Elements List is empty'''						)

		__UpperCAmelCase    :     int													=	Node(elements_list[0]						)
		for i in range(1 ,   len(_UpperCAmelCase						)						):
				__UpperCAmelCase    :     Any													=	Node(elements_list[i]						)
				__UpperCAmelCase    :     Optional[int]													=	current.next
		return head

def        a						(      _UpperCAmelCase							:					Node						):







		'''simple docstring'''





		if head_node is not None and isinstance(_UpperCAmelCase ,   _UpperCAmelCase						):
				print_reverse(head_node.next						)
				print(head_node.data						)

def        a						(      ):







		'''simple docstring'''





		from doctest import testmod

		testmod()

		__UpperCAmelCase    :     Tuple													=	make_linked_list([14, 52, 14, 12, 43]						)
		print('''Linked List:'''						)
		print(_UpperCAmelCase						)
		print('''Elements in Reverse:'''						)
		print_reverse(_UpperCAmelCase						)


if __name__ == "__main__":
				main()





