






import os
import sys

_a      	=  os.path.join(os.path.dirname(__file__), '''src''')
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


_a      	=  [
    '''torch''',
    '''numpy''',
    '''tokenizers''',
    '''filelock''',
    '''requests''',
    '''tqdm''',
    '''regex''',
    '''sentencepiece''',
    '''sacremoses''',
    '''importlib_metadata''',
    '''huggingface_hub''',
]


@add_start_docstrings(AutoConfig.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  str:





						"""simple docstring"""



						return AutoConfig.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)


@add_start_docstrings(AutoTokenizer.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  Optional[int]:





						"""simple docstring"""



						return AutoTokenizer.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)


@add_start_docstrings(AutoModel.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  int:





						"""simple docstring"""



						return AutoModel.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)


@add_start_docstrings(AutoModelForCausalLM.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  Union[str, Any]:





						"""simple docstring"""



						return AutoModelForCausalLM.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)


@add_start_docstrings(AutoModelForMaskedLM.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  List[Any]:





						"""simple docstring"""



						return AutoModelForMaskedLM.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)


@add_start_docstrings(AutoModelForSequenceClassification.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  Optional[Any]:





						"""simple docstring"""



						return AutoModelForSequenceClassification.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)


@add_start_docstrings(AutoModelForQuestionAnswering.__doc__	)
def __A    (      *__lowerCAmelCase ,		**__lowerCAmelCase	)->  Tuple:





						"""simple docstring"""



						return AutoModelForQuestionAnswering.from_pretrained(*__lowerCAmelCase ,		**__lowerCAmelCase	)








from __future__ import annotations

from itertools import permutations
from random import randint
from timeit import repeat


def __A    (      )->  tuple[list[int], int]:





						"""simple docstring"""



						_UpperCAmelCase									=			[randint(-1_000 ,		1_000	) for i in range(10	)]
						_UpperCAmelCase									=			randint(-5_000 ,		5_000	)
						return (arr, r)


_a      	=  make_dataset()


def __A    (      __lowerCAmelCase ,		__lowerCAmelCase	)->  tuple[int, ...]:





						"""simple docstring"""



						for triplet in permutations(__lowerCAmelCase ,		3	):
												if sum(__lowerCAmelCase	) == target:
																		return tuple(sorted(__lowerCAmelCase	)	)
						return (0, 0, 0)


def __A    (      __lowerCAmelCase ,		__lowerCAmelCase	)->  tuple[int, int, int]:





						"""simple docstring"""



						arr.sort()
						_UpperCAmelCase									=			len(__lowerCAmelCase	)
						for i in range(n - 1	):
												_UpperCAmelCase					, _UpperCAmelCase									=			i + 1, n - 1
												while left < right:
																		if arr[i] + arr[left] + arr[right] == target:
																								return (arr[i], arr[left], arr[right])
																		elif arr[i] + arr[left] + arr[right] < target:
																								left += 1
																		elif arr[i] + arr[left] + arr[right] > target:
																								right -= 1
						return (0, 0, 0)


def __A    (      )->  tuple[float, float]:





						"""simple docstring"""



						_UpperCAmelCase									=			'\nfrom __main__ import dataset, triplet_sum1, triplet_sum2\n'
						_UpperCAmelCase									=			'\ntriplet_sum1(*dataset)\n'
						_UpperCAmelCase									=			'\ntriplet_sum2(*dataset)\n'
						_UpperCAmelCase									=			repeat(setup=__lowerCAmelCase ,		stmt=__lowerCAmelCase ,		repeat=5 ,		number=10_000	)
						_UpperCAmelCase									=			repeat(setup=__lowerCAmelCase ,		stmt=__lowerCAmelCase ,		repeat=5 ,		number=10_000	)
						return (min(__lowerCAmelCase	), min(__lowerCAmelCase	))


if __name__ == "__main__":
		from doctest import testmod

		testmod()
		_a      	=  solution_times()
		print(F'''The time for naive implementation is {times[0]}.''')
		print(F'''The time for optimized implementation is {times[1]}.''')
